Go to the documentation of this file.
104 if (!CSRegs || CSRegs[0] == 0)
127 for (
unsigned i = 0; CSRegs[
i]; ++
i) {
128 unsigned Reg = CSRegs[
i];
155 if (!
F.hasLocalLinkage() ||
F.hasAddressTaken() ||
156 !
F.hasFnAttribute(Attribute::NoRecurse))
159 for (
const User *U :
F.users())
160 if (
auto *CB = dyn_cast<CallBase>(U))
161 if (CB->isTailCall())
virtual void getCalleeSaves(const MachineFunction &MF, BitVector &SavedRegs) const
Returns the callee-saved registers as computed by determineCalleeSaves in the BitVector SavedRegs.
This is an optimization pass for GlobalISel generic memory operations.
virtual bool needsFrameIndexResolution(const MachineFunction &MF) const
MachineRegisterInfo - Keep track of information for virtual and physical registers,...
unsigned getNumRegs() const
Return the number of registers this target has (useful for sizing arrays holding per register informa...
virtual Register getInitialCFARegister(const MachineFunction &MF) const
Return initial CFA register value i.e.
Reg
All possible values of the reg field in the ModR/M byte.
int getOffsetAdjustment() const
Return the correction for frame offsets.
virtual const TargetRegisterInfo * getRegisterInfo() const
getRegisterInfo - If register information is available, return it.
TargetRegisterInfo base class - We assume that the target defines a static array of TargetRegisterDes...
ScalarTy getFixed() const
void resize(unsigned N, bool t=false)
resize - Grow or shrink the bitvector.
bool callsUnwindInit() const
virtual DwarfFrameBase getDwarfFrameBase(const MachineFunction &MF) const
Return the frame base information to be encoded in the DWARF subprogram debug info.
virtual ~TargetFrameLowering()
virtual bool enableCalleeSaveSkip(const MachineFunction &MF) const
Returns true if the target can safely skip saving callee-saved registers for noreturn nounwind functi...
virtual bool useFPForScavengingIndex(const MachineFunction &MF) const
Returns true if the target wants to use frame pointer based accesses to spill to the scavenger emerge...
unsigned const TargetRegisterInfo * TRI
bool hasStackObjects() const
Return true if there are any stack objects in this function.
virtual bool isProfitableForNoCSROpt(const Function &F) const
Check if the no-CSR optimisation is profitable for the given function.
MachineRegisterInfo & getRegInfo()
getRegInfo - Return information about the registers currently in use.
int getOffsetOfLocalArea() const
getOffsetOfLocalArea - This method returns the offset of the local area from the stack pointer on ent...
virtual bool enableCFIFixup(MachineFunction &MF) const
Returns true if we may need to fix the unwind information for the function.
unsigned EnableIPRA
This flag enables InterProcedural Register Allocation (IPRA).
virtual bool hasFP(const MachineFunction &MF) const =0
hasFP - Return true if the specified function should have a dedicated frame pointer register.
uint64_t getStackSize() const
Return the number of bytes that must be allocated to hold all of the fixed size frame objects.
int64_t getObjectOffset(int ObjectIdx) const
Return the assigned stack offset of the specified object from the incoming stack pointer.
Analysis containing CSE Info
bool isCalleeSavedInfoValid() const
Has the callee saved info been calculated yet?
const TargetSubtargetInfo & getSubtarget() const
getSubtarget - Return the subtarget for which this machine code is being compiled.
bool hasFnAttribute(Attribute::AttrKind Kind) const
Return true if the function has the attribute.
CallingConv::ID getCallingConv() const
getCallingConv()/setCallingConv(CC) - These method get and set the calling convention of this functio...
virtual Register getFrameRegister(const MachineFunction &MF) const =0
Debug information queries.
const MCPhysReg * getCalleeSavedRegs() const
Returns list of callee saved registers.
static bool isSafeForNoCSROpt(const Function &F)
Check if given function is safe for not having callee saved registers.
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
MachineFrameInfo & getFrameInfo()
getFrameInfo - Return the frame info object for the current function.
const std::vector< CalleeSavedInfo > & getCalleeSavedInfo() const
Returns a reference to call saved info vector for the current function.
const MCAsmInfo * getMCAsmInfo() const
Return target specific asm information.
#define llvm_unreachable(msg)
Marks that the current location is not supposed to be reachable.
StackOffset is a class to represent an offset with 2 dimensions, named fixed and scalable,...
unsigned const MachineRegisterInfo * MRI
Wrapper class representing virtual and physical registers.
Function & getFunction()
Return the LLVM function that this machine code represents.
bool needsFrameMoves() const
True if this function needs frame moves for debug or exceptions.
The CalleeSavedInfo class tracks the information need to locate where a callee saved register is in t...
virtual bool allocateScavengingFrameIndexesNearIncomingSP(const MachineFunction &MF) const
Control the placement of special register scavenging spill slots when allocating a stack frame.
const LLVMTargetMachine & getTarget() const
getTarget - Return the target machine this machine code is compiled with
virtual StackOffset getFrameIndexReference(const MachineFunction &MF, int FI, Register &FrameReg) const
getFrameIndexReference - This method should return the base register and offset used to reference a f...
bool isPhysRegModified(MCRegister PhysReg, bool SkipNoReturnDef=false) const
Return true if the specified register is modified in this function.
unsigned getAllocaPointerSize() const
bool hasStackRealignment(const MachineFunction &MF) const
True if stack realignment is required and still possible.
The MachineFrameInfo class represents an abstract stack frame until prolog/epilog code is inserted.
virtual int getInitialCFAOffset(const MachineFunction &MF) const
Return initial CFA offset value i.e.
virtual void determineCalleeSaves(MachineFunction &MF, BitVector &SavedRegs, RegScavenger *RS=nullptr) const
This method determines which of the registers reported by TargetRegisterInfo::getCalleeSavedRegs() sh...
#define LLVM_UNLIKELY(EXPR)
bool usesWindowsCFI() const
@ HHVM
Calling convention used by HipHop Virtual Machine (HHVM) to perform calls to and from translation cac...
virtual unsigned getStackAlignmentSkew(const MachineFunction &MF) const
Return the skew that has to be applied to stack alignment under certain conditions (e....