2011-04-15 21:51:11 +00:00
|
|
|
//==--- MipsFrameLowering.h - Define frame lowering for Mips --*- C++ -*---===//
|
2010-11-15 00:06:54 +00:00
|
|
|
//
|
|
|
|
// The LLVM Compiler Infrastructure
|
|
|
|
//
|
|
|
|
// This file is distributed under the University of Illinois Open Source
|
|
|
|
// License. See LICENSE.TXT for details.
|
|
|
|
//
|
2011-04-15 21:51:11 +00:00
|
|
|
//===----------------------------------------------------------------------===//
|
2010-11-15 00:06:54 +00:00
|
|
|
//
|
|
|
|
//
|
|
|
|
//
|
2011-04-15 21:51:11 +00:00
|
|
|
//===----------------------------------------------------------------------===//
|
2010-11-15 00:06:54 +00:00
|
|
|
|
2011-03-04 19:20:24 +00:00
|
|
|
#ifndef MIPS_FRAMEINFO_H
|
|
|
|
#define MIPS_FRAMEINFO_H
|
2010-11-15 00:06:54 +00:00
|
|
|
|
|
|
|
#include "Mips.h"
|
|
|
|
#include "MipsSubtarget.h"
|
2011-01-10 12:39:04 +00:00
|
|
|
#include "llvm/Target/TargetFrameLowering.h"
|
2010-11-15 00:06:54 +00:00
|
|
|
|
|
|
|
namespace llvm {
|
|
|
|
class MipsSubtarget;
|
|
|
|
|
2011-01-10 12:39:04 +00:00
|
|
|
class MipsFrameLowering : public TargetFrameLowering {
|
2010-11-15 00:06:54 +00:00
|
|
|
protected:
|
|
|
|
const MipsSubtarget &STI;
|
|
|
|
|
|
|
|
public:
|
2011-01-10 12:39:04 +00:00
|
|
|
explicit MipsFrameLowering(const MipsSubtarget &sti)
|
2011-05-23 20:16:59 +00:00
|
|
|
: TargetFrameLowering(StackGrowsDown, 8, 0), STI(sti) {
|
2010-11-15 00:06:54 +00:00
|
|
|
}
|
|
|
|
|
2011-05-23 20:16:59 +00:00
|
|
|
bool targetHandlesStackFrameRounding() const;
|
2010-11-15 00:06:54 +00:00
|
|
|
|
|
|
|
/// emitProlog/emitEpilog - These methods insert prolog and epilog code into
|
|
|
|
/// the function.
|
|
|
|
void emitPrologue(MachineFunction &MF) const;
|
|
|
|
void emitEpilogue(MachineFunction &MF, MachineBasicBlock &MBB) const;
|
2010-11-18 21:19:35 +00:00
|
|
|
|
|
|
|
bool hasFP(const MachineFunction &MF) const;
|
2011-01-18 19:50:18 +00:00
|
|
|
|
2011-05-26 18:59:03 +00:00
|
|
|
void getInitialFrameState(std::vector<MachineMove> &Moves) const;
|
|
|
|
|
2011-05-20 18:39:33 +00:00
|
|
|
void processFunctionBeforeCalleeSavedScan(MachineFunction &MF,
|
|
|
|
RegScavenger *RS) const;
|
2010-11-15 00:06:54 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
} // End llvm namespace
|
|
|
|
|
|
|
|
#endif
|