summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/MachineFunctionPass.cpp
diff options
context:
space:
mode:
authorChandler Carruth <chandlerc@gmail.com>2016-03-10 00:55:30 +0000
committerChandler Carruth <chandlerc@gmail.com>2016-03-10 00:55:30 +0000
commit61440d225b0869aa1c82a0d76e6311eccf7307bc (patch)
tree4f2d3ed8c71a209a73f77803aed77c190f1f8b1f /llvm/lib/CodeGen/MachineFunctionPass.cpp
parentae81bbb49674a1e05f12f3aed1d5bdcaff7fa3eb (diff)
downloadbcm5719-llvm-61440d225b0869aa1c82a0d76e6311eccf7307bc.tar.gz
bcm5719-llvm-61440d225b0869aa1c82a0d76e6311eccf7307bc.zip
[PM] Port memdep to the new pass manager.
This is a fairly straightforward port to the new pass manager with one exception. It removes a very questionable use of releaseMemory() in the old pass to invalidate its caches between runs on a function. I don't think this is really guaranteed to be safe. I've just used the more direct port to the new PM to address this by nuking the results object each time the pass runs. While this could cause some minor malloc traffic increase, I don't expect the compile time performance hit to be noticable, and it makes the correctness and other aspects of the pass much easier to reason about. In some cases, it may make things faster by making the sets and maps smaller with better locality. Indeed, the measurements collected by Bruno (thanks!!!) show mostly compile time improvements. There is sadly very limited testing at this point as there are only two tests of memdep, and both rely on GVN. I'll be porting GVN next and that will exercise this heavily though. Differential Revision: http://reviews.llvm.org/D17962 llvm-svn: 263082
Diffstat (limited to 'llvm/lib/CodeGen/MachineFunctionPass.cpp')
-rw-r--r--llvm/lib/CodeGen/MachineFunctionPass.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/MachineFunctionPass.cpp b/llvm/lib/CodeGen/MachineFunctionPass.cpp
index 5ca41bec3c3..1913d99a781 100644
--- a/llvm/lib/CodeGen/MachineFunctionPass.cpp
+++ b/llvm/lib/CodeGen/MachineFunctionPass.cpp
@@ -59,7 +59,7 @@ void MachineFunctionPass::getAnalysisUsage(AnalysisUsage &AU) const {
AU.addPreserved<GlobalsAAWrapperPass>();
AU.addPreserved<IVUsers>();
AU.addPreserved<LoopInfoWrapperPass>();
- AU.addPreserved<MemoryDependenceAnalysis>();
+ AU.addPreserved<MemoryDependenceWrapperPass>();
AU.addPreserved<ScalarEvolutionWrapperPass>();
AU.addPreserved<SCEVAAWrapperPass>();
AU.addPreserved<StackProtector>();
OpenPOWER on IntegriCloud