summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/TargetMachineC.cpp
diff options
context:
space:
mode:
authorChandler Carruth <chandlerc@gmail.com>2015-02-01 12:26:09 +0000
committerChandler Carruth <chandlerc@gmail.com>2015-02-01 12:26:09 +0000
commit5ec2b1d11ad4986da2691aceea2ac09cc3230e56 (patch)
tree46d805787f5a21637a3cfffbc9ef336029ff6e3b /llvm/lib/Target/TargetMachineC.cpp
parentfdb9c573f754364bddee53e75049e9ddd6cc457a (diff)
downloadbcm5719-llvm-5ec2b1d11ad4986da2691aceea2ac09cc3230e56.tar.gz
bcm5719-llvm-5ec2b1d11ad4986da2691aceea2ac09cc3230e56.zip
[multiversion] Implement the old pass manager's TTI wrapper pass in
terms of the new pass manager's TargetIRAnalysis. Yep, this is one of the nicer bits of the new pass manager's design. Passes can in many cases operate in a vacuum and so we can just nest things when convenient. This is particularly convenient here as I can now consolidate all of the TargetMachine logic on this analysis. The most important change here is that this pushes the function we need TTI for all the way into the TargetMachine, and re-creates the TTI object for each function rather than re-using it for each function. We're now prepared to teach the targets to produce function-specific TTI objects with specific subtargets cached, etc. One piece of feedback I'd love here is whether its worth renaming any of this stuff. None of the names really seem that awesome to me at this point, but TargetTransformInfoWrapperPass is particularly ... odd. TargetIRAnalysisWrapper might make more sense. I would want to do that rename separately anyways, but let me know what you think. llvm-svn: 227731
Diffstat (limited to 'llvm/lib/Target/TargetMachineC.cpp')
-rw-r--r--llvm/lib/Target/TargetMachineC.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/lib/Target/TargetMachineC.cpp b/llvm/lib/Target/TargetMachineC.cpp
index 9d759a3e644..8be10cb3262 100644
--- a/llvm/lib/Target/TargetMachineC.cpp
+++ b/llvm/lib/Target/TargetMachineC.cpp
@@ -256,5 +256,6 @@ char *LLVMGetDefaultTargetTriple(void) {
}
void LLVMAddAnalysisPasses(LLVMTargetMachineRef T, LLVMPassManagerRef PM) {
- unwrap(PM)->add(createTargetTransformInfoWrapperPass(unwrap(T)->getTTI()));
+ unwrap(PM)->add(
+ createTargetTransformInfoWrapperPass(unwrap(T)->getTargetIRAnalysis()));
}
OpenPOWER on IntegriCloud