diff options
author | Serge Pavlov <sepavloff@gmail.com> | 2017-01-13 06:09:54 +0000 |
---|---|---|
committer | Serge Pavlov <sepavloff@gmail.com> | 2017-01-13 06:09:54 +0000 |
commit | d409411ef195329a24cea00589e9853ab6a5ace8 (patch) | |
tree | 31459227034048c2e1e5274200e73d075317eb6e /llvm/lib/CodeGen/MachineDominators.cpp | |
parent | d30e6f7421f4b319f1203d660bbc89f09d8944f7 (diff) | |
download | bcm5719-llvm-d409411ef195329a24cea00589e9853ab6a5ace8.tar.gz bcm5719-llvm-d409411ef195329a24cea00589e9853ab6a5ace8.zip |
Track validity of pass results
Running tests with expensive checks enabled exhibits some problems with
verification of pass results.
First, the pass verification may require results of analysis that are not
available. For instance, verification of loop info requires results of dominator
tree analysis. A pass may be marked as conserving loop info but does not need to
be dependent on DominatorTreePass. When a pass manager tries to verify that loop
info is valid, it needs dominator tree, but corresponding analysis may be
already destroyed as no user of it remained.
Another case is a pass that is skipped. For instance, entities with linkage
available_externally do not need code generation and such passes are skipped for
them. In this case result verification must also be skipped.
To solve these problems this change introduces a special flag to the Pass
structure to mark passes that have valid results. If this flag is reset,
verifications dependent on the pass result are skipped.
Differential Revision: https://reviews.llvm.org/D27190
llvm-svn: 291882
Diffstat (limited to 'llvm/lib/CodeGen/MachineDominators.cpp')
-rw-r--r-- | llvm/lib/CodeGen/MachineDominators.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/MachineDominators.cpp b/llvm/lib/CodeGen/MachineDominators.cpp index 303a6a9263b..a548480044e 100644 --- a/llvm/lib/CodeGen/MachineDominators.cpp +++ b/llvm/lib/CodeGen/MachineDominators.cpp @@ -69,7 +69,7 @@ void MachineDominatorTree::releaseMemory() { } void MachineDominatorTree::verifyAnalysis() const { - if (VerifyMachineDomInfo) + if (VerifyMachineDomInfo && isExecuted()) verifyDomTree(); } |