[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)
commit7724e8efa2d3b71f293807f4323f4e760a37f249
tree9a206cb91acbffc2e490f92cfe5c0b91e454b8be
parent270f7a2669ebb7f81503819b0569d2368993a090
[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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@227721 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/Analysis/TargetTransformInfo.h
include/llvm/Target/TargetMachine.h
lib/Analysis/TargetTransformInfo.cpp
lib/Target/TargetMachine.cpp
test/Other/new-pass-manager.ll
tools/opt/NewPMDriver.cpp
tools/opt/NewPMDriver.h
tools/opt/PassRegistry.def
tools/opt/Passes.cpp
tools/opt/Passes.h
tools/opt/opt.cpp