From: Eric Christopher Date: Thu, 5 Jun 2014 22:10:58 +0000 (+0000) Subject: Remove X86Subtarget from the X86FrameLowering constructor since X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=38ee55ddfad7299bc5e8709b8acd153b3099e228;p=oota-llvm.git Remove X86Subtarget from the X86FrameLowering constructor since we can just pass in the values we already know and we're not caching the subtarget anymore. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@210292 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Target/X86/X86FrameLowering.h b/lib/Target/X86/X86FrameLowering.h index b225f2d17da..5c43c1488d4 100644 --- a/lib/Target/X86/X86FrameLowering.h +++ b/lib/Target/X86/X86FrameLowering.h @@ -14,7 +14,6 @@ #ifndef X86_FRAMELOWERING_H #define X86_FRAMELOWERING_H -#include "X86Subtarget.h" #include "llvm/Target/TargetFrameLowering.h" namespace llvm { @@ -24,9 +23,8 @@ class X86TargetMachine; class X86FrameLowering : public TargetFrameLowering { public: - explicit X86FrameLowering(const X86Subtarget &sti) - : TargetFrameLowering(StackGrowsDown, sti.getStackAlignment(), - (sti.is64Bit() ? -8 : -4)) {} + explicit X86FrameLowering(StackDirection D, unsigned StackAl, int LAO) + : TargetFrameLowering(StackGrowsDown, StackAl, LAO) {} void emitCalleeSavedFrameMoves(MachineBasicBlock &MBB, MachineBasicBlock::iterator MBBI, DebugLoc DL, diff --git a/lib/Target/X86/X86TargetMachine.cpp b/lib/Target/X86/X86TargetMachine.cpp index b2e4acb338f..73fd21479df 100644 --- a/lib/Target/X86/X86TargetMachine.cpp +++ b/lib/Target/X86/X86TargetMachine.cpp @@ -70,19 +70,17 @@ static std::string computeDataLayout(const X86Subtarget &ST) { /// X86TargetMachine ctor - Create an X86 target. /// -X86TargetMachine::X86TargetMachine(const Target &T, StringRef TT, - StringRef CPU, StringRef FS, - const TargetOptions &Options, +X86TargetMachine::X86TargetMachine(const Target &T, StringRef TT, StringRef CPU, + StringRef FS, const TargetOptions &Options, Reloc::Model RM, CodeModel::Model CM, CodeGenOpt::Level OL) - : LLVMTargetMachine(T, TT, CPU, FS, Options, RM, CM, OL), - Subtarget(TT, CPU, FS, Options.StackAlignmentOverride), - FrameLowering(Subtarget), - DL(computeDataLayout(*getSubtargetImpl())), - InstrInfo(*this), - TLInfo(*this), - TSInfo(*this), - JITInfo(*this) { + : LLVMTargetMachine(T, TT, CPU, FS, Options, RM, CM, OL), + Subtarget(TT, CPU, FS, Options.StackAlignmentOverride), + FrameLowering(TargetFrameLowering::StackGrowsDown, + Subtarget.getStackAlignment(), + Subtarget.is64Bit() ? -8 : -4), + DL(computeDataLayout(*getSubtargetImpl())), InstrInfo(*this), + TLInfo(*this), TSInfo(*this), JITInfo(*this) { // Determine the PICStyle based on the target selected. if (getRelocationModel() == Reloc::Static) { // Unless we're in PIC or DynamicNoPIC mode, set the PIC style to None.