the various ConstantExpr::get*Ty methods existed to work with issues around
[llvm/stm8.git] / lib / Target / MBlaze / MBlazeFrameLowering.h
blob8be15bfb857d934ee324eb9e23549035a92cc47b
1 //=- MBlazeFrameLowering.h - Define frame lowering for MicroBlaze -*- C++ -*-=//
2 //
3 // The LLVM Compiler Infrastructure
4 //
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
7 //
8 //===----------------------------------------------------------------------===//
9 //
12 //===----------------------------------------------------------------------===//
14 #ifndef MBLAZE_FRAMEINFO_H
15 #define MBLAZE_FRAMEINFO_H
17 #include "MBlaze.h"
18 #include "MBlazeSubtarget.h"
19 #include "llvm/Target/TargetFrameLowering.h"
21 namespace llvm {
22 class MBlazeSubtarget;
24 class MBlazeFrameLowering : public TargetFrameLowering {
25 protected:
26 const MBlazeSubtarget &STI;
28 public:
29 explicit MBlazeFrameLowering(const MBlazeSubtarget &sti)
30 : TargetFrameLowering(TargetFrameLowering::StackGrowsUp, 4, 0), STI(sti) {
33 /// targetHandlesStackFrameRounding - Returns true if the target is
34 /// responsible for rounding up the stack frame (probably at emitPrologue
35 /// time).
36 bool targetHandlesStackFrameRounding() const { return true; }
38 /// emitProlog/emitEpilog - These methods insert prolog and epilog code into
39 /// the function.
40 void emitPrologue(MachineFunction &MF) const;
41 void emitEpilogue(MachineFunction &MF, MachineBasicBlock &MBB) const;
43 bool hasFP(const MachineFunction &MF) const;
45 int getFrameIndexOffset(const MachineFunction &MF, int FI) const;
47 virtual void processFunctionBeforeCalleeSavedScan(MachineFunction &MF,
48 RegScavenger *RS) const;
51 } // End llvm namespace
53 #endif