LLVM  8.0.1
ARCFrameLowering.h
Go to the documentation of this file.
1 //===- ARCFrameLowering.h - Define frame lowering for ARC -------*- 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 //
10 // This class implements the ARC specific frame lowering.
11 //
12 //===----------------------------------------------------------------------===//
13 
14 #ifndef LLVM_LIB_TARGET_ARC_ARCFRAMELOWERING_H
15 #define LLVM_LIB_TARGET_ARC_ARCFRAMELOWERING_H
16 
17 #include "ARC.h"
21 
22 namespace llvm {
23 
24 class MachineFunction;
25 class ARCSubtarget;
26 class ARCInstrInfo;
27 
29 public:
32  }
33 
34  /// Insert Prologue into the function.
35  void emitPrologue(MachineFunction &MF, MachineBasicBlock &MBB) const override;
36 
37  /// Insert Epilogue into the function.
38  void emitEpilogue(MachineFunction &MF, MachineBasicBlock &MBB) const override;
39 
40  /// Add explicit callee save registers.
41  void determineCalleeSaves(MachineFunction &MF, BitVector &SavedRegs,
42  RegScavenger *RS) const override;
43 
46  const std::vector<CalleeSavedInfo> &CSI,
47  const TargetRegisterInfo *TRI) const override;
48 
49  bool
52  std::vector<CalleeSavedInfo> &CSI,
53  const TargetRegisterInfo *TRI) const override;
54 
56  RegScavenger *RS) const override;
57 
58  bool hasFP(const MachineFunction &MF) const override;
59 
62  MachineBasicBlock::iterator I) const override;
63 
66  std::vector<llvm::CalleeSavedInfo> &) const override;
67 
68 private:
69  void adjustStackToMatchRecords(MachineBasicBlock &MBB,
71  bool allocate) const;
72 
73  const ARCSubtarget &ST;
74 };
75 
76 } // end namespace llvm
77 
78 #endif // LLVM_LIB_TARGET_ARC_ARCFRAMELOWERING_H
This class represents lattice values for constants.
Definition: AllocatorList.h:24
ARCFrameLowering(const ARCSubtarget &st)
void emitPrologue(MachineFunction &MF, MachineBasicBlock &MBB) const override
Insert Prologue into the function.
unsigned const TargetRegisterInfo * TRI
void determineCalleeSaves(MachineFunction &MF, BitVector &SavedRegs, RegScavenger *RS) const override
Add explicit callee save registers.
MachineBasicBlock::iterator eliminateCallFramePseudoInstr(MachineFunction &MF, MachineBasicBlock &MBB, MachineBasicBlock::iterator I) const override
This method is called during prolog/epilog code insertion to eliminate call frame setup and destroy p...
bool assignCalleeSavedSpillSlots(llvm::MachineFunction &, const llvm::TargetRegisterInfo *, std::vector< llvm::CalleeSavedInfo > &) const override
assignCalleeSavedSpillSlots - Allows target to override spill slot assignment logic.
bool hasFP(const MachineFunction &MF) const override
hasFP - Return true if the specified function should have a dedicated frame pointer register...
TargetRegisterInfo base class - We assume that the target defines a static array of TargetRegisterDes...
void processFunctionBeforeFrameFinalized(MachineFunction &MF, RegScavenger *RS) const override
processFunctionBeforeFrameFinalized - This method is called immediately before the specified function...
bool restoreCalleeSavedRegisters(MachineBasicBlock &MBB, MachineBasicBlock::iterator MI, std::vector< CalleeSavedInfo > &CSI, const TargetRegisterInfo *TRI) const override
restoreCalleeSavedRegisters - Issues instruction(s) to restore all callee saved registers and returns...
Information about stack frame layout on the target.
bool spillCalleeSavedRegisters(MachineBasicBlock &MBB, MachineBasicBlock::iterator MI, const std::vector< CalleeSavedInfo > &CSI, const TargetRegisterInfo *TRI) const override
spillCalleeSavedRegisters - Issues instruction(s) to spill all callee saved registers and returns tru...
void emitEpilogue(MachineFunction &MF, MachineBasicBlock &MBB) const override
Insert Epilogue into the function.
#define I(x, y, z)
Definition: MD5.cpp:58
IRTranslator LLVM IR MI