diff options
author | Eric Christopher <echristo@gmail.com> | 2015-03-21 03:13:10 +0000 |
---|---|---|
committer | Eric Christopher <echristo@gmail.com> | 2015-03-21 03:13:10 +0000 |
commit | c5a85af3b23b958f1c86768b7622503d76761966 (patch) | |
tree | aeee4a24c27d615f149cdd235b81ddf4abb4b463 /llvm/lib/CodeGen/MachineFunction.cpp | |
parent | cba722f8c13c8a52cf81a09ab4ad19478bb82e6e (diff) | |
download | llvm-c5a85af3b23b958f1c86768b7622503d76761966.zip llvm-c5a85af3b23b958f1c86768b7622503d76761966.tar.gz llvm-c5a85af3b23b958f1c86768b7622503d76761966.tar.bz2 |
Cache the Function dependent subtarget on the MachineFunction.
As preparation for removing the getSubtargetImpl() call from
TargetMachine go ahead and flip the switch on caching the function
dependent subtarget and remove the bare getSubtargetImpl call
from the X86 port. As part of this add a few tests that show we
can generate code and assemble on X86 based on features/cpu on
the Function.
llvm-svn: 232879
Diffstat (limited to 'llvm/lib/CodeGen/MachineFunction.cpp')
-rw-r--r-- | llvm/lib/CodeGen/MachineFunction.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/MachineFunction.cpp b/llvm/lib/CodeGen/MachineFunction.cpp index 4cd584e..9c90334 100644 --- a/llvm/lib/CodeGen/MachineFunction.cpp +++ b/llvm/lib/CodeGen/MachineFunction.cpp @@ -54,7 +54,7 @@ void ilist_traits<MachineBasicBlock>::deleteNode(MachineBasicBlock *MBB) { MachineFunction::MachineFunction(const Function *F, const TargetMachine &TM, unsigned FunctionNum, MachineModuleInfo &mmi) - : Fn(F), Target(TM), STI(TM.getSubtargetImpl()), Ctx(mmi.getContext()), + : Fn(F), Target(TM), STI(TM.getSubtargetImpl(*F)), Ctx(mmi.getContext()), MMI(mmi) { if (STI->getRegisterInfo()) RegInfo = new (Allocator) MachineRegisterInfo(this); |