LLVM  14.0.0git
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 
34  bool
38  const TargetRegisterInfo *TRI) const override;
39  bool
43  const TargetRegisterInfo *TRI) const override;
44 
47  MachineBasicBlock::iterator I) const override;
48 
49  bool hasFP(const MachineFunction &MF) const override;
50 
51  void determineCalleeSaves(MachineFunction &MF, BitVector &SavedRegs,
52  RegScavenger *RS = nullptr) const override;
53 
55  RegScavenger *RS = nullptr) const override;
56 
57  //! Stack slot size (4 bytes)
58  static int stackSlotSize() {
59  return 4;
60  }
61  };
62 }
63 
64 #endif
MI
IRTranslator LLVM IR MI
Definition: IRTranslator.cpp:103
llvm
---------------------— PointerInfo ------------------------------------—
Definition: AllocatorList.h:23
TargetFrameLowering.h
llvm::TargetFrameLowering
Information about stack frame layout on the target.
Definition: TargetFrameLowering.h:43
llvm::XCoreFrameLowering::hasFP
bool hasFP(const MachineFunction &MF) const override
hasFP - Return true if the specified function should have a dedicated frame pointer register.
Definition: XCoreFrameLowering.cpp:218
llvm::XCoreFrameLowering::stackSlotSize
static int stackSlotSize()
Stack slot size (4 bytes)
Definition: XCoreFrameLowering.h:58
llvm::TargetRegisterInfo
TargetRegisterInfo base class - We assume that the target defines a static array of TargetRegisterDes...
Definition: TargetRegisterInfo.h:233
TRI
unsigned const TargetRegisterInfo * TRI
Definition: MachineSink.cpp:1567
TargetMachine.h
llvm::MutableArrayRef
MutableArrayRef - Represent a mutable reference to an array (0 or more elements consecutively in memo...
Definition: ArrayRef.h:307
llvm::XCoreFrameLowering::emitPrologue
void emitPrologue(MachineFunction &MF, MachineBasicBlock &MBB) const override
emitProlog/emitEpilog - These methods insert prolog and epilog code into the function.
Definition: XCoreFrameLowering.cpp:223
llvm::XCoreFrameLowering::emitEpilogue
void emitEpilogue(MachineFunction &MF, MachineBasicBlock &MBB) const override
Definition: XCoreFrameLowering.cpp:343
llvm::XCoreFrameLowering::XCoreFrameLowering
XCoreFrameLowering(const XCoreSubtarget &STI)
Definition: XCoreFrameLowering.cpp:213
llvm::BitVector
Definition: BitVector.h:74
llvm::XCoreFrameLowering::determineCalleeSaves
void determineCalleeSaves(MachineFunction &MF, BitVector &SavedRegs, RegScavenger *RS=nullptr) const override
This method determines which of the registers reported by TargetRegisterInfo::getCalleeSavedRegs() sh...
Definition: XCoreFrameLowering.cpp:527
llvm::MachineBasicBlock
Definition: MachineBasicBlock.h:95
llvm::XCoreFrameLowering::restoreCalleeSavedRegisters
bool restoreCalleeSavedRegisters(MachineBasicBlock &MBB, MachineBasicBlock::iterator MI, MutableArrayRef< CalleeSavedInfo > CSI, const TargetRegisterInfo *TRI) const override
restoreCalleeSavedRegisters - Issues instruction(s) to restore all callee saved registers and returns...
Definition: XCoreFrameLowering.cpp:448
I
#define I(x, y, z)
Definition: MD5.cpp:59
llvm::RegScavenger
Definition: RegisterScavenging.h:34
llvm::XCoreFrameLowering::spillCalleeSavedRegisters
bool spillCalleeSavedRegisters(MachineBasicBlock &MBB, MachineBasicBlock::iterator MI, ArrayRef< CalleeSavedInfo > CSI, const TargetRegisterInfo *TRI) const override
spillCalleeSavedRegisters - Issues instruction(s) to spill all callee saved registers and returns tru...
Definition: XCoreFrameLowering.cpp:415
llvm::XCoreFrameLowering::eliminateCallFramePseudoInstr
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...
Definition: XCoreFrameLowering.cpp:480
llvm::MachineFunction
Definition: MachineFunction.h:230
llvm::ArrayRef
ArrayRef - Represent a constant reference to an array (0 or more elements consecutively in memory),...
Definition: APInt.h:32
MBB
MachineBasicBlock & MBB
Definition: AArch64SLSHardening.cpp:74
llvm::XCoreFrameLowering
Definition: XCoreFrameLowering.h:23
llvm::XCoreFrameLowering::processFunctionBeforeFrameFinalized
void processFunctionBeforeFrameFinalized(MachineFunction &MF, RegScavenger *RS=nullptr) const override
processFunctionBeforeFrameFinalized - This method is called immediately before the specified function...
Definition: XCoreFrameLowering.cpp:566
llvm::MachineInstrBundleIterator< MachineInstr >
llvm::XCoreSubtarget
Definition: XCoreSubtarget.h:31