LLVM  9.0.0svn
X86MachineFunctionInfo.cpp
Go to the documentation of this file.
1 //===-- X86MachineFunctionInfo.cpp - X86 machine function info ------------===//
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 
10 #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 = MF->getRegInfo().getCalleeSavedRegs();
24  unsigned Reg = *CSR; ++CSR) {
25  if (X86::GR64RegClass.contains(Reg) || X86::GR32RegClass.contains(Reg))
26  RestoreBasePointerOffset -= SlotSize;
27  }
28  }
29 }
30 
This class represents lattice values for constants.
Definition: AllocatorList.h:23
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.