diff options
author | Adam Nemet <anemet@apple.com> | 2016-08-26 15:58:34 +0000 |
---|---|---|
committer | Adam Nemet <anemet@apple.com> | 2016-08-26 15:58:34 +0000 |
commit | 4f155b6e9122d4a95d98cab04ac4a18a64e389d5 (patch) | |
tree | f84056ebd738f4f2c80a31b47414f85cb35b7959 /llvm/lib/Transforms/Utils/LoopUtils.cpp | |
parent | f7ba0891ce6369cee4245991824a73279ca31258 (diff) | |
download | llvm-4f155b6e9122d4a95d98cab04ac4a18a64e389d5.zip llvm-4f155b6e9122d4a95d98cab04ac4a18a64e389d5.tar.gz llvm-4f155b6e9122d4a95d98cab04ac4a18a64e389d5.tar.bz2 |
[LoopUnroll] Use OptimizationRemarkEmitter directly not via the analysis pass
We can't mark ORE (a function pass) preserved as required by the loop
passes because that is how we ensure that the required passes like
LazyBFI are all available any time ORE is used. See the new comments in
the patch.
Instead we use it directly just like the inliner does in D22694.
As expected there is some additional overhead after removing the caching
provided by analysis passes. The worst case, I measured was
LNT/CINT2006_ref/401.bzip2 which regresses by 12%. As before, this only
affects -Rpass-with-hotness and not default compilation.
llvm-svn: 279829
Diffstat (limited to 'llvm/lib/Transforms/Utils/LoopUtils.cpp')
-rw-r--r-- | llvm/lib/Transforms/Utils/LoopUtils.cpp | 4 |
1 files changed, 0 insertions, 4 deletions
diff --git a/llvm/lib/Transforms/Utils/LoopUtils.cpp b/llvm/lib/Transforms/Utils/LoopUtils.cpp index 624db3c..8878689 100644 --- a/llvm/lib/Transforms/Utils/LoopUtils.cpp +++ b/llvm/lib/Transforms/Utils/LoopUtils.cpp @@ -17,7 +17,6 @@ #include "llvm/Analysis/GlobalsModRef.h" #include "llvm/Analysis/GlobalsModRef.h" #include "llvm/Analysis/LoopInfo.h" -#include "llvm/Analysis/OptimizationDiagnosticInfo.h" #include "llvm/Analysis/ScalarEvolution.h" #include "llvm/Analysis/ScalarEvolutionAliasAnalysis.h" #include "llvm/Analysis/ScalarEvolutionExpander.h" @@ -962,8 +961,6 @@ void llvm::getLoopAnalysisUsage(AnalysisUsage &AU) { AU.addPreserved<SCEVAAWrapperPass>(); AU.addRequired<ScalarEvolutionWrapperPass>(); AU.addPreserved<ScalarEvolutionWrapperPass>(); - AU.addRequired<OptimizationRemarkEmitterWrapperPass>(); - AU.addPreserved<OptimizationRemarkEmitterWrapperPass>(); } /// Manually defined generic "LoopPass" dependency initialization. This is used @@ -984,7 +981,6 @@ void llvm::initializeLoopPassPass(PassRegistry &Registry) { INITIALIZE_PASS_DEPENDENCY(GlobalsAAWrapperPass) INITIALIZE_PASS_DEPENDENCY(SCEVAAWrapperPass) INITIALIZE_PASS_DEPENDENCY(ScalarEvolutionWrapperPass) - INITIALIZE_PASS_DEPENDENCY(OptimizationRemarkEmitterWrapperPass) } /// \brief Find string metadata for loop |