summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Analysis/Analysis.cpp
diff options
context:
space:
mode:
authorPhilip Reames <listmail@philipreames.com>2018-03-20 17:09:21 +0000
committerPhilip Reames <listmail@philipreames.com>2018-03-20 17:09:21 +0000
commit89f224177014760e34ff75adbfc8bb9ea43e01b2 (patch)
tree497fadac997ca509cdd1bd68553bdc41ba121285 /llvm/lib/Analysis/Analysis.cpp
parent52c55896c6e48ee8b327fb4057bff0b357ddc8ae (diff)
downloadbcm5719-llvm-89f224177014760e34ff75adbfc8bb9ea43e01b2.tar.gz
bcm5719-llvm-89f224177014760e34ff75adbfc8bb9ea43e01b2.zip
Add an analysis printer for must execute reasoning
Many of our loop passes make use of so called "must execute" or "guaranteed to execute" facts to prove the legality of code motion. The basic notion is that we know (by assumption) an instruction didn't fault at it's original location, so if the location we move it to is strictly post dominated by the original, then we can't have introduced a new fault. At the moment, the testing for this logic is somewhat adhoc and done mostly through LICM. Since I'm working on that code, I want to improve the testing. This patch is the first step in that direction. It doesn't actually test the variant used by the loop passes - I need to move that to the Analysis library first - but instead exercises an alternate implementation used by SCEV. (I plan on merging both implementations.) Note: I'll be replacing the printing logic within this with an annotation based version in the near future. Anna suggested this in review, and it seems like a strictly better format. Differential Revision: https://reviews.llvm.org/D44524 llvm-svn: 328004
Diffstat (limited to 'llvm/lib/Analysis/Analysis.cpp')
-rw-r--r--llvm/lib/Analysis/Analysis.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/llvm/lib/Analysis/Analysis.cpp b/llvm/lib/Analysis/Analysis.cpp
index 0e0b5c92a91..401ce7a25a7 100644
--- a/llvm/lib/Analysis/Analysis.cpp
+++ b/llvm/lib/Analysis/Analysis.cpp
@@ -65,6 +65,7 @@ void llvm::initializeAnalysis(PassRegistry &Registry) {
initializeMemoryDependenceWrapperPassPass(Registry);
initializeModuleDebugInfoPrinterPass(Registry);
initializeModuleSummaryIndexWrapperPassPass(Registry);
+ initializeMustExecutePrinterPass(Registry);
initializeObjCARCAAWrapperPassPass(Registry);
initializeOptimizationRemarkEmitterWrapperPassPass(Registry);
initializePostDominatorTreeWrapperPassPass(Registry);
OpenPOWER on IntegriCloud