[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)
commitb71d3854948296ce7225cc19aeaaad5f7840baf1
tree7872cbf23a3341961e1ad040ffec347edea6ef89
parentd0bfb83efbec7dfabc60f655ec0fab2b63132f93
[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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@227738 91177308-0d34-0410-b5e6-96231b3b80d8
12 files changed:
include/llvm/CodeGen/BasicTTIImpl.h
lib/CodeGen/BasicTargetTransformInfo.cpp
lib/CodeGen/LLVMTargetMachine.cpp
lib/Target/AArch64/AArch64TargetTransformInfo.h
lib/Target/ARM/ARMTargetTransformInfo.h
lib/Target/Mips/MipsTargetMachine.cpp
lib/Target/NVPTX/NVPTXTargetTransformInfo.h
lib/Target/PowerPC/PPCTargetTransformInfo.cpp
lib/Target/PowerPC/PPCTargetTransformInfo.h
lib/Target/R600/AMDGPUTargetTransformInfo.h
lib/Target/X86/X86TargetTransformInfo.h
lib/Target/XCore/XCoreTargetTransformInfo.h