[PM] Switch the TargetMachine interface from accepting a pass manager
authorChandler Carruth <chandlerc@gmail.com>
Sat, 31 Jan 2015 11:17:59 +0000 (11:17 +0000)
committerChandler Carruth <chandlerc@gmail.com>
Sat, 31 Jan 2015 11:17:59 +0000 (11:17 +0000)
commit1937233a222144826216aad1eb18ccbbd2ea3ecd
tree88cbea1a630908bd23a3496665bfd19e6181f8ce
parent2d94613ec1af7711c9f63d434dbb02ef1bb86cc0
[PM] Switch the TargetMachine interface from accepting a pass manager
base which it adds a single analysis pass to, to instead return the type
erased TargetTransformInfo object constructed for that TargetMachine.

This removes all of the pass variants for TTI. There is now a single TTI
*pass* in the Analysis layer. All of the Analysis <-> Target
communication is through the TTI's type erased interface itself. While
the diff is large here, it is nothing more that code motion to make
types available in a header file for use in a different source file
within each target.

I've tried to keep all the doxygen comments and file boilerplate in line
with this move, but let me know if I missed anything.

With this in place, the next step to making TTI work with the new pass
manager is to introduce a really simple new-style analysis that produces
a TTI object via a callback into this routine on the target machine.
Once we have that, we'll have the building blocks necessary to accept
a function argument as well.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@227685 91177308-0d34-0410-b5e6-96231b3b80d8
41 files changed:
include/llvm/Analysis/TargetTransformInfo.h
include/llvm/CodeGen/BasicTTIImpl.h
include/llvm/Target/TargetMachine.h
lib/Analysis/TargetTransformInfo.cpp
lib/CodeGen/BasicTargetTransformInfo.cpp
lib/CodeGen/LLVMTargetMachine.cpp
lib/LTO/LTOCodeGenerator.cpp
lib/Target/AArch64/AArch64TargetMachine.cpp
lib/Target/AArch64/AArch64TargetMachine.h
lib/Target/AArch64/AArch64TargetTransformInfo.cpp
lib/Target/AArch64/AArch64TargetTransformInfo.h [new file with mode: 0644]
lib/Target/ARM/ARMTargetMachine.cpp
lib/Target/ARM/ARMTargetMachine.h
lib/Target/ARM/ARMTargetTransformInfo.cpp
lib/Target/ARM/ARMTargetTransformInfo.h [new file with mode: 0644]
lib/Target/Mips/MipsTargetMachine.cpp
lib/Target/Mips/MipsTargetMachine.h
lib/Target/NVPTX/NVPTXTargetMachine.cpp
lib/Target/NVPTX/NVPTXTargetMachine.h
lib/Target/NVPTX/NVPTXTargetTransformInfo.cpp
lib/Target/NVPTX/NVPTXTargetTransformInfo.h [new file with mode: 0644]
lib/Target/PowerPC/PPCTargetMachine.cpp
lib/Target/PowerPC/PPCTargetMachine.h
lib/Target/PowerPC/PPCTargetTransformInfo.cpp
lib/Target/PowerPC/PPCTargetTransformInfo.h [new file with mode: 0644]
lib/Target/R600/AMDGPUTargetMachine.cpp
lib/Target/R600/AMDGPUTargetMachine.h
lib/Target/R600/AMDGPUTargetTransformInfo.cpp
lib/Target/R600/AMDGPUTargetTransformInfo.h [new file with mode: 0644]
lib/Target/TargetMachine.cpp
lib/Target/TargetMachineC.cpp
lib/Target/X86/X86TargetMachine.cpp
lib/Target/X86/X86TargetMachine.h
lib/Target/X86/X86TargetTransformInfo.cpp
lib/Target/X86/X86TargetTransformInfo.h [new file with mode: 0644]
lib/Target/XCore/CMakeLists.txt
lib/Target/XCore/XCoreTargetMachine.cpp
lib/Target/XCore/XCoreTargetMachine.h
lib/Target/XCore/XCoreTargetTransformInfo.cpp [deleted file]
lib/Target/XCore/XCoreTargetTransformInfo.h [new file with mode: 0644]
tools/opt/opt.cpp