Replace calls to get the subtarget and TargetFrameLowering with

cached variables and a single call in the constructor.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@219287 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Eric Christopher
2014-10-08 08:46:34 +00:00
parent 13ffdf88dc
commit 5dd4454174
2 changed files with 27 additions and 32 deletions

View File

@@ -121,7 +121,11 @@ class MachineFrameInfo {
isSpillSlot(isSS), Alloca(Val), PreAllocated(false), isAliased(A) {}
};
const TargetMachine &TM;
/// StackAlignment - The alignment of the stack.
unsigned StackAlignment;
/// StackRealignable - Can the stack be realigned.
bool StackRealignable;
/// Objects - The list of stack objects allocated...
///
@@ -242,10 +246,11 @@ class MachineFrameInfo {
/// True if this is a varargs function that contains a musttail call.
bool HasMustTailInVarArgFunc;
const TargetFrameLowering *getFrameLowering() const;
public:
explicit MachineFrameInfo(const TargetMachine &TM, bool RealignOpt)
: TM(TM), RealignOption(RealignOpt) {
explicit MachineFrameInfo(unsigned StackAlign, bool isStackRealign,
bool RealignOpt)
: StackAlignment(StackAlign), StackRealignable(isStackRealign),
RealignOption(RealignOpt) {
StackSize = NumFixedObjects = OffsetAdjustment = MaxAlignment = 0;
HasVarSizedObjects = false;
FrameAddressTaken = false;