[PM] Port TTI to the new pass manager, introducing a TargetIRAnalysis to
authorChandler Carruth <chandlerc@gmail.com>
Sun, 1 Feb 2015 10:11:22 +0000 (10:11 +0000)
committerChandler Carruth <chandlerc@gmail.com>
Sun, 1 Feb 2015 10:11:22 +0000 (10:11 +0000)
commite038552c8ae99abe129837255273a992f72c6d9c
tree391c11977c8ac0b7230a1a747c4dc8d74d0f210a
parent2844ca7319bab9dacceb499227c15391ce97fb87
[PM] Port TTI to the new pass manager, introducing a TargetIRAnalysis to
produce it.

This adds a function to the TargetMachine that produces this analysis
via a callback for each function. This in turn faves the way to produce
a *different* TTI per-function with the correct subtarget cached.

I've also done the necessary wiring in the opt tool to thread the target
machine down and make it available to the pass registry so that we can
construct this analysis from a target machine when available.

llvm-svn: 227721
llvm/include/llvm/Analysis/TargetTransformInfo.h
llvm/include/llvm/Target/TargetMachine.h
llvm/lib/Analysis/TargetTransformInfo.cpp
llvm/lib/Target/TargetMachine.cpp
llvm/test/Other/new-pass-manager.ll
llvm/tools/opt/NewPMDriver.cpp
llvm/tools/opt/NewPMDriver.h
llvm/tools/opt/PassRegistry.def
llvm/tools/opt/Passes.cpp
llvm/tools/opt/Passes.h
llvm/tools/opt/opt.cpp