mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-23 11:13:28 +01:00
2ca6c65ad5
passes too many time. I think this is actually the issue that someone raised with me at the developer's meeting and in an email, but that we never really got to the bottom of. Having all the testing utilities made it much easier to dig down and uncover the core issue. When a pass manager is running many passes over a single function, we need it to invalidate the analyses between each run so that they can be re-computed as needed. We also need to track the intersection of preserved higher-level analyses across all the passes that we run (for example, if there is one module analysis which all the function analyses preserve, we want to track that and propagate it). Unfortunately, this interacted poorly with any enclosing pass adaptor between two IR units. It would see the intersection of preserved analyses, and need to invalidate any other analyses, but some of the un-preserved analyses might have already been invalidated *and recomputed*! We would fail to propagate the fact that the analysis had already been invalidated. The solution to this struck me as really strange at first, but the more I thought about it, the more natural it seemed. After a nice discussion with Duncan about it on IRC, it seemed even nicer. The idea is that invalidating an analysis *causes* it to be preserved! Preserving the lack of result is trivial. If it is recomputed, great. Until something *else* invalidates it again, we're good. The consequence of this is that the invalidate methods on the analysis manager which operate over many passes now consume their PreservedAnalyses object, update it to "preserve" every analysis pass to which it delivers an invalidation (regardless of whether the pass chooses to be removed, or handles the invalidation itself by updating itself). Then we return this augmented set from the invalidate routine, letting the pass manager take the result and use the intersection of *that* across each pass run to compute the final preserved set. This accounts for all the places where the early invalidation of an analysis has already "preserved" it for a future run. I've beefed up the testing and adjusted the assertions to show that we no longer repeatedly invalidate or compute the analyses across nested pass managers. llvm-svn: 225333 |
||
---|---|---|
.. | ||
Inputs | ||
X86 | ||
2002-01-31-CallGraph.ll | ||
2002-02-24-InlineBrokePHINodes.ll | ||
2002-03-11-ConstPropCrash.ll | ||
2003-02-19-LoopInfoNestingBug.ll | ||
2004-08-16-PackedConstantInlineStore.ll | ||
2004-08-16-PackedGlobalConstant.ll | ||
2004-08-16-PackedSelect.ll | ||
2004-08-16-PackedSimple.ll | ||
2004-08-20-PackedControlFlow.ll | ||
2006-02-05-PassManager.ll | ||
2007-04-24-eliminate-mostly-empty-blocks.ll | ||
2007-06-05-PassID.ll | ||
2007-06-28-PassManager.ll | ||
2007-09-10-PassManager.ll | ||
2008-02-14-PassManager.ll | ||
2008-06-04-FieldSizeInPacked.ll | ||
2008-10-06-RemoveDeadPass.ll | ||
2008-10-15-MissingSpace.ll | ||
2009-03-31-CallGraph.ll | ||
2009-06-05-no-implicit-float.ll | ||
2009-09-14-function-elements.ll | ||
2010-05-06-Printer.ll | ||
attribute-comment.ll | ||
bcanalyzer-block-info.txt | ||
can-execute.txt | ||
close-stderr.ll | ||
constant-fold-gep-address-spaces.ll | ||
constant-fold-gep.ll | ||
extract-alias.ll | ||
extract-linkonce.ll | ||
extract-weak-odr.ll | ||
extract.ll | ||
FileCheck-space.txt | ||
invalid-commandline-option.ll | ||
lint.ll | ||
lit-unicode.txt | ||
llvm-nm-without-aliases.ll | ||
new-pass-manager.ll | ||
optimization-remarks-inline.ll | ||
optimize-options.ll | ||
pass-pipeline-parsing.ll | ||
pipefail.txt | ||
ResponseFile.ll | ||
spir_cc.ll | ||
umask.ll |