LLVM  8.0.1
X86MachineFunctionInfo.cpp
Go to the documentation of this file.
1 //===-- X86MachineFunctionInfo.cpp - X86 machine function info ------------===//
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 #include "X86MachineFunctionInfo.h"
11 #include "X86RegisterInfo.h"
14 
15 using namespace llvm;
16 
17 void X86MachineFunctionInfo::anchor() { }
18 
20  if (!RestoreBasePointerOffset) {
21  const X86RegisterInfo *RegInfo = static_cast<const X86RegisterInfo *>(
23  unsigned SlotSize = RegInfo->getSlotSize();
24  for (const MCPhysReg *CSR = MF->getRegInfo().getCalleeSavedRegs();
25  unsigned Reg = *CSR; ++CSR) {
26  if (X86::GR64RegClass.contains(Reg) || X86::GR32RegClass.contains(Reg))
27  RestoreBasePointerOffset -= SlotSize;
28  }
29  }
30 }
31 
This class represents lattice values for constants.
Definition: AllocatorList.h:24
virtual const TargetRegisterInfo * getRegisterInfo() const
getRegisterInfo - If register information is available, return it.
unsigned Reg
unsigned getSlotSize() const
return AArch64::GPR64RegClass contains(Reg)
uint16_t MCPhysReg
An unsigned integer type large enough to represent all physical registers, but not necessarily virtua...
const TargetSubtargetInfo & getSubtarget() const
getSubtarget - Return the subtarget for which this machine code is being compiled.
void setRestoreBasePointer(const MachineFunction *MF)
MachineRegisterInfo & getRegInfo()
getRegInfo - Return information about the registers currently in use.
const MCPhysReg * getCalleeSavedRegs() const
Returns list of callee saved registers.