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
This commit is contained in:
Eric Christopher 2014-06-05 22:10:58 +00:00
parent 6156e562ef
commit 38ee55ddfa
2 changed files with 11 additions and 15 deletions

View 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,

View 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.