LLVM API Documentation

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
SystemZFrameLowering.h
Go to the documentation of this file.
1 //===-- SystemZFrameLowering.h - Frame lowering for SystemZ -----*- 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 #ifndef SYSTEMZFRAMELOWERING_H
11 #define SYSTEMZFRAMELOWERING_H
12 
13 #include "SystemZSubtarget.h"
14 #include "llvm/ADT/IndexedMap.h"
16 
17 namespace llvm {
18 class SystemZTargetMachine;
19 class SystemZSubtarget;
20 
22  IndexedMap<unsigned> RegSpillOffsets;
23 
24 protected:
27 
28 public:
30  const SystemZSubtarget &sti);
31 
32  // Override TargetFrameLowering.
33  virtual bool isFPCloseToIncomingSP() const LLVM_OVERRIDE { return false; }
34  virtual const SpillSlot *getCalleeSavedSpillSlots(unsigned &NumEntries) const
36  virtual void
38  RegScavenger *RS) const LLVM_OVERRIDE;
39  virtual bool
42  const std::vector<CalleeSavedInfo> &CSI,
43  const TargetRegisterInfo *TRI) const
45  virtual bool
48  const std::vector<CalleeSavedInfo> &CSI,
49  const TargetRegisterInfo *TRI) const
52  RegScavenger *RS) const;
53  virtual void emitPrologue(MachineFunction &MF) const LLVM_OVERRIDE;
54  virtual void emitEpilogue(MachineFunction &MF,
55  MachineBasicBlock &MBB) const LLVM_OVERRIDE;
56  virtual bool hasFP(const MachineFunction &MF) const LLVM_OVERRIDE;
57  virtual int getFrameIndexOffset(const MachineFunction &MF,
58  int FI) const LLVM_OVERRIDE;
59  virtual bool hasReservedCallFrame(const MachineFunction &MF) const
61  virtual void
63  MachineBasicBlock &MBB,
66 
67  // Return the number of bytes in the callee-allocated part of the frame.
68  uint64_t getAllocatedStackSize(const MachineFunction &MF) const;
69 
70  // Return the byte offset from the incoming stack pointer of Reg's
71  // ABI-defined save slot. Return 0 if no slot is defined for Reg.
72  unsigned getRegSpillOffset(unsigned Reg) const {
73  return RegSpillOffsets[Reg];
74  }
75 };
76 } // end namespace llvm
77 
78 #endif
virtual bool hasReservedCallFrame(const MachineFunction &MF) const LLVM_OVERRIDE
unsigned getRegSpillOffset(unsigned Reg) const
virtual bool spillCalleeSavedRegisters(MachineBasicBlock &MBB, MachineBasicBlock::iterator MBBI, const std::vector< CalleeSavedInfo > &CSI, const TargetRegisterInfo *TRI) const LLVM_OVERRIDE
SystemZFrameLowering(const SystemZTargetMachine &tm, const SystemZSubtarget &sti)
virtual void processFunctionBeforeCalleeSavedScan(MachineFunction &MF, RegScavenger *RS) const LLVM_OVERRIDE
const SystemZTargetMachine & TM
virtual void eliminateCallFramePseudoInstr(MachineFunction &MF, MachineBasicBlock &MBB, MachineBasicBlock::iterator MI) const LLVM_OVERRIDE
virtual void emitEpilogue(MachineFunction &MF, MachineBasicBlock &MBB) const LLVM_OVERRIDE
uint64_t getAllocatedStackSize(const MachineFunction &MF) const
virtual bool isFPCloseToIncomingSP() const LLVM_OVERRIDE
virtual bool hasFP(const MachineFunction &MF) const LLVM_OVERRIDE
virtual void emitPrologue(MachineFunction &MF) const LLVM_OVERRIDE
virtual bool restoreCalleeSavedRegisters(MachineBasicBlock &MBB, MachineBasicBlock::iterator MBBII, const std::vector< CalleeSavedInfo > &CSI, const TargetRegisterInfo *TRI) const LLVM_OVERRIDE
virtual void processFunctionBeforeFrameFinalized(MachineFunction &MF, RegScavenger *RS) const
virtual const SpillSlot * getCalleeSavedSpillSlots(unsigned &NumEntries) const LLVM_OVERRIDE
virtual int getFrameIndexOffset(const MachineFunction &MF, int FI) const LLVM_OVERRIDE
const SystemZSubtarget & STI
#define LLVM_OVERRIDE
Definition: Compiler.h:155