LLVM 20.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
20namespace 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
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
MachineBasicBlock & MBB
IRTranslator LLVM IR MI
#define I(x, y, z)
Definition: MD5.cpp:58
unsigned const TargetRegisterInfo * TRI
ArrayRef - Represent a constant reference to an array (0 or more elements consecutively in memory),...
Definition: ArrayRef.h:41
MutableArrayRef - Represent a mutable reference to an array (0 or more elements consecutively in memo...
Definition: ArrayRef.h:307
Information about stack frame layout on the target.
TargetRegisterInfo base class - We assume that the target defines a static array of TargetRegisterDes...
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...
static int stackSlotSize()
Stack slot size (4 bytes)
bool hasFP(const MachineFunction &MF) const override
hasFP - Return true if the specified function should have a dedicated frame pointer register.
void emitEpilogue(MachineFunction &MF, MachineBasicBlock &MBB) const override
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...
void determineCalleeSaves(MachineFunction &MF, BitVector &SavedRegs, RegScavenger *RS=nullptr) const override
This method determines which of the registers reported by TargetRegisterInfo::getCalleeSavedRegs() sh...
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...
void processFunctionBeforeFrameFinalized(MachineFunction &MF, RegScavenger *RS=nullptr) const override
processFunctionBeforeFrameFinalized - This method is called immediately before the specified function...
void emitPrologue(MachineFunction &MF, MachineBasicBlock &MBB) const override
emitProlog/emitEpilog - These methods insert prolog and epilog code into the function.
This is an optimization pass for GlobalISel generic memory operations.
Definition: AddressRanges.h:18