LLVM  4.0.0
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"
13 
14 using namespace llvm;
15 
16 void X86MachineFunctionInfo::anchor() { }
17 
19  if (!RestoreBasePointerOffset) {
20  const X86RegisterInfo *RegInfo = static_cast<const X86RegisterInfo *>(
22  unsigned SlotSize = RegInfo->getSlotSize();
23  for (const MCPhysReg *CSR =
24  RegInfo->X86RegisterInfo::getCalleeSavedRegs(MF);
25  unsigned Reg = *CSR;
26  ++CSR)
27  {
28  if (X86::GR64RegClass.contains(Reg) || X86::GR32RegClass.contains(Reg))
29  RestoreBasePointerOffset -= SlotSize;
30  }
31  }
32 }
33 
uint16_t MCPhysReg
An unsigned integer type large enough to represent all physical registers, but not necessarily virtua...
return AArch64::GPR64RegClass contains(Reg)
const TargetSubtargetInfo & getSubtarget() const
getSubtarget - Return the subtarget for which this machine code is being compiled.
Reg
All possible values of the reg field in the ModR/M byte.
void setRestoreBasePointer(const MachineFunction *MF)
unsigned getSlotSize() const
virtual const TargetRegisterInfo * getRegisterInfo() const
getRegisterInfo - If register information is available, return it.