Remove X86Subtarget from the X86FrameLowering constructor since
authorEric Christopher <echristo@gmail.com>
Thu, 5 Jun 2014 22:10:58 +0000 (22:10 +0000)
committerEric Christopher <echristo@gmail.com>
Thu, 5 Jun 2014 22:10:58 +0000 (22:10 +0000)
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

lib/Target/X86/X86FrameLowering.h
lib/Target/X86/X86TargetMachine.cpp

index b225f2d17da720a10babddca6f6c83fdb31d2f81..5c43c1488d4a9db383be7883d2d513986055a6f6 100644 (file)
@@ -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,
index b2e4acb338f23df414ecc6c935b3ecb617a412c2..73fd21479dfc22bd4971dfaae13b3fed31609acc 100644 (file)
@@ -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.