summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorChandler Carruth <chandlerc@gmail.com>2014-01-17 10:56:02 +0000
committerChandler Carruth <chandlerc@gmail.com>2014-01-17 10:56:02 +0000
commit0c25726596b2619144c50778338f849ec5a21219 (patch)
treee698ae348dcbd386e1a2756daf47817ba026d049 /include
parentb9536ac581d0d74b29c11dcb33e22200b22b86b1 (diff)
[PM] Remove the preverifier and directly compute the DominatorTree for
the verifier after ensuring the CFG is at least usefully formed. This fixes a number of problems: 1) The PreVerifier was missing the controls the Verifier provides over *how* an invalid module is handled -- it just aborted the program! Now it uses the same logic as the Verifier which is significantly more library-friendly. 2) The DominatorTree used previously could have been cached and not updated due to bugs in prior passes and we would silently use the stale tree. This could cause dominance errors to not be as quickly diagnosed. 3) We can now (in the next patch) pull the functionality of the verifier apart from the pass infrastructure so that you can verify IR without having any form of pass manager. This in turn frees the code to share logic between old and new pass manager variants. Along the way I fixed at least one annoying bug -- the state for 'Broken' wasn't being cleared from run to run causing all functions visited after the first broken function to be marked as broken regardless of whether *they* were a problem. Fortunately, I don't really know much of a way to observe this peculiarity. In case folks are worried about the runtime cost, its negligible. I looked at running the entire regression test suite (which should be a relatively good use of the verifier) before and after but was unable to even measure the time spent on the verifier and there was no regresion from before to after. I checked both with debug builds and optimized builds. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@199487 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include')
-rw-r--r--include/llvm/InitializePasses.h1
1 files changed, 0 insertions, 1 deletions
diff --git a/include/llvm/InitializePasses.h b/include/llvm/InitializePasses.h
index 2e4e1029373..a88d94945a8 100644
--- a/include/llvm/InitializePasses.h
+++ b/include/llvm/InitializePasses.h
@@ -211,7 +211,6 @@ void initializePostDomViewerPass(PassRegistry&);
void initializePostDominatorTreePass(PassRegistry&);
void initializePostRASchedulerPass(PassRegistry&);
void initializePostMachineSchedulerPass(PassRegistry&);
-void initializePreVerifierPass(PassRegistry&);
void initializePrintFunctionPassWrapperPass(PassRegistry&);
void initializePrintModulePassWrapperPass(PassRegistry&);
void initializePrintBasicBlockPassPass(PassRegistry&);