summaryrefslogtreecommitdiff
path: root/lib/Target/X86/X86TargetMachine.cpp
diff options
context:
space:
mode:
authorEric Christopher <echristo@gmail.com>2014-06-05 22:10:58 +0000
committerEric Christopher <echristo@gmail.com>2014-06-05 22:10:58 +0000
commit38ee55ddfad7299bc5e8709b8acd153b3099e228 (patch)
treee5ae776bdfcbd40618d3475741a81d6208aaf386 /lib/Target/X86/X86TargetMachine.cpp
parent6156e562ef42ed25274c2894aedb22b909184771 (diff)
downloadllvm-38ee55ddfad7299bc5e8709b8acd153b3099e228.tar.gz
llvm-38ee55ddfad7299bc5e8709b8acd153b3099e228.tar.bz2
llvm-38ee55ddfad7299bc5e8709b8acd153b3099e228.tar.xz
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
Diffstat (limited to 'lib/Target/X86/X86TargetMachine.cpp')
-rw-r--r--lib/Target/X86/X86TargetMachine.cpp20
1 files changed, 9 insertions, 11 deletions
diff --git a/lib/Target/X86/X86TargetMachine.cpp b/lib/Target/X86/X86TargetMachine.cpp
index b2e4acb338..73fd21479d 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.