[multiversion] Switch the TTI queries from TargetMachine to Subtarget
authorChandler Carruth <chandlerc@gmail.com>
Sun, 1 Feb 2015 14:22:17 +0000 (14:22 +0000)
committerChandler Carruth <chandlerc@gmail.com>
Sun, 1 Feb 2015 14:22:17 +0000 (14:22 +0000)
commitc956ab66037e3b0e6b3a039728348de1db1c4ad6
treecb1ce486bb5c35458d300ea5f52cf6972d611bc2
parentc340ca839c083970e3ff0d123c771fe01e43c808
[multiversion] Switch the TTI queries from TargetMachine to Subtarget
now that we have a correct and cached subtarget specific to the
function.

Also, finish providing a cached per-function subtarget in the core
LLVMTargetMachine -- that layer hadn't switched over yet.

The only use of the TargetMachine was to re-lookup a subtarget for
a particular function to work around the fact that TTI was immutable.
Now that it is per-function and we haved a cached subtarget, use it.

This still leaves a few interfaces with real warts on them where we were
passing Function objects through the TTI interface. I'll remove these
and clean their usage up in subsequent commits now that this isn't
necessary.

llvm-svn: 227738
12 files changed:
llvm/include/llvm/CodeGen/BasicTTIImpl.h
llvm/lib/CodeGen/BasicTargetTransformInfo.cpp
llvm/lib/CodeGen/LLVMTargetMachine.cpp
llvm/lib/Target/AArch64/AArch64TargetTransformInfo.h
llvm/lib/Target/ARM/ARMTargetTransformInfo.h
llvm/lib/Target/Mips/MipsTargetMachine.cpp
llvm/lib/Target/NVPTX/NVPTXTargetTransformInfo.h
llvm/lib/Target/PowerPC/PPCTargetTransformInfo.cpp
llvm/lib/Target/PowerPC/PPCTargetTransformInfo.h
llvm/lib/Target/R600/AMDGPUTargetTransformInfo.h
llvm/lib/Target/X86/X86TargetTransformInfo.h
llvm/lib/Target/XCore/XCoreTargetTransformInfo.h