Cache the Function dependent subtarget on the MachineFunction.
authorEric Christopher <echristo@gmail.com>
Sat, 21 Mar 2015 03:13:10 +0000 (03:13 +0000)
committerEric Christopher <echristo@gmail.com>
Sat, 21 Mar 2015 03:13:10 +0000 (03:13 +0000)
commit6f125f52d34b2d4d63b582f473956addce259310
treeba1e1ee1a433248e5637f0895a1b9731d1d9260c
parent773e6614fb0cf673cfa1a9de9622cd89fef0602a
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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@232879 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/MachineFunction.cpp
lib/Target/X86/X86TargetMachine.h
test/CodeGen/X86/function-subtarget-features-2.ll [new file with mode: 0644]
test/CodeGen/X86/function-subtarget-features.ll [new file with mode: 0644]