LLVM  10.0.0svn
XCoreFrameLowering.h
Go to the documentation of this file.
1 //===-- XCoreFrameLowering.h - Frame info for XCore Target ------*- C++ -*-===//
2 //
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //
7 //===----------------------------------------------------------------------===//
8 //
9 // This file contains XCore frame information that doesn't fit anywhere else
10 // cleanly...
11 //
12 //===----------------------------------------------------------------------===//
13 
14 #ifndef LLVM_LIB_TARGET_XCORE_XCOREFRAMELOWERING_H
15 #define LLVM_LIB_TARGET_XCORE_XCOREFRAMELOWERING_H
16 
19 
20 namespace llvm {
21  class XCoreSubtarget;
22 
24  public:
26 
27  /// emitProlog/emitEpilog - These methods insert prolog and epilog code into
28  /// the function.
30  MachineBasicBlock &MBB) const override;
32  MachineBasicBlock &MBB) const override;
33 
36  const std::vector<CalleeSavedInfo> &CSI,
37  const TargetRegisterInfo *TRI) const override;
40  std::vector<CalleeSavedInfo> &CSI,
41  const TargetRegisterInfo *TRI) const override;
42 
45  MachineBasicBlock::iterator I) const override;
46 
47  bool hasFP(const MachineFunction &MF) const override;
48 
49  void determineCalleeSaves(MachineFunction &MF, BitVector &SavedRegs,
50  RegScavenger *RS = nullptr) const override;
51 
53  RegScavenger *RS = nullptr) const override;
54 
55  //! Stack slot size (4 bytes)
56  static int stackSlotSize() {
57  return 4;
58  }
59  };
60 }
61 
62 #endif
This class represents lattice values for constants.
Definition: AllocatorList.h:23
XCoreFrameLowering(const XCoreSubtarget &STI)
unsigned const TargetRegisterInfo * TRI
static int stackSlotSize()
Stack slot size (4 bytes)
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 emitPrologue(MachineFunction &MF, MachineBasicBlock &MBB) const override
emitProlog/emitEpilog - These methods insert prolog and epilog code into the function.
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 determineCalleeSaves(MachineFunction &MF, BitVector &SavedRegs, RegScavenger *RS=nullptr) const override
This method determines which of the registers reported by TargetRegisterInfo::getCalleeSavedRegs() sh...
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.
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...
void processFunctionBeforeFrameFinalized(MachineFunction &MF, RegScavenger *RS=nullptr) const override
processFunctionBeforeFrameFinalized - This method is called immediately before the specified function...
#define I(x, y, z)
Definition: MD5.cpp:58
void emitEpilogue(MachineFunction &MF, MachineBasicBlock &MBB) const override
IRTranslator LLVM IR MI