[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)
commit93dcdc47db64b1674996d555786230873c83bdde
treeea487af3bf71bde23ad90436b32a0c4a9c8d3191
parent9559a5c05e1fab06c7493eb34dd37cf06cb353d8
[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.

llvm-svn: 227685
40 files changed:
llvm/include/llvm/Analysis/TargetTransformInfo.h
llvm/include/llvm/CodeGen/BasicTTIImpl.h
llvm/include/llvm/Target/TargetMachine.h
llvm/lib/Analysis/TargetTransformInfo.cpp
llvm/lib/CodeGen/BasicTargetTransformInfo.cpp
llvm/lib/CodeGen/LLVMTargetMachine.cpp
llvm/lib/LTO/LTOCodeGenerator.cpp
llvm/lib/Target/AArch64/AArch64TargetMachine.cpp
llvm/lib/Target/AArch64/AArch64TargetMachine.h
llvm/lib/Target/AArch64/AArch64TargetTransformInfo.cpp
llvm/lib/Target/AArch64/AArch64TargetTransformInfo.h [new file with mode: 0644]
llvm/lib/Target/ARM/ARMTargetMachine.cpp
llvm/lib/Target/ARM/ARMTargetMachine.h
llvm/lib/Target/ARM/ARMTargetTransformInfo.cpp
llvm/lib/Target/ARM/ARMTargetTransformInfo.h [new file with mode: 0644]
llvm/lib/Target/Mips/MipsTargetMachine.cpp
llvm/lib/Target/Mips/MipsTargetMachine.h
llvm/lib/Target/NVPTX/NVPTXTargetMachine.cpp
llvm/lib/Target/NVPTX/NVPTXTargetMachine.h
llvm/lib/Target/NVPTX/NVPTXTargetTransformInfo.cpp
llvm/lib/Target/NVPTX/NVPTXTargetTransformInfo.h [new file with mode: 0644]
llvm/lib/Target/PowerPC/PPCTargetMachine.cpp
llvm/lib/Target/PowerPC/PPCTargetMachine.h
llvm/lib/Target/PowerPC/PPCTargetTransformInfo.cpp
llvm/lib/Target/PowerPC/PPCTargetTransformInfo.h [new file with mode: 0644]
llvm/lib/Target/R600/AMDGPUTargetMachine.cpp
llvm/lib/Target/R600/AMDGPUTargetMachine.h
llvm/lib/Target/R600/AMDGPUTargetTransformInfo.cpp
llvm/lib/Target/R600/AMDGPUTargetTransformInfo.h [new file with mode: 0644]
llvm/lib/Target/TargetMachine.cpp
llvm/lib/Target/TargetMachineC.cpp
llvm/lib/Target/X86/X86TargetMachine.cpp
llvm/lib/Target/X86/X86TargetMachine.h
llvm/lib/Target/X86/X86TargetTransformInfo.cpp
llvm/lib/Target/X86/X86TargetTransformInfo.h [new file with mode: 0644]
llvm/lib/Target/XCore/CMakeLists.txt
llvm/lib/Target/XCore/XCoreTargetMachine.cpp
llvm/lib/Target/XCore/XCoreTargetMachine.h
llvm/lib/Target/XCore/XCoreTargetTransformInfo.h [moved from llvm/lib/Target/XCore/XCoreTargetTransformInfo.cpp with 69% similarity]
llvm/tools/opt/opt.cpp