1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-23 11:13:28 +01:00
llvm-mirror/test/Other
Chandler Carruth 2ca6c65ad5 [PM] Fix a pretty nasty bug where the new pass manager would invalidate
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
2015-01-07 01:58:35 +00:00
..
Inputs Teach llvm-bcanalyzer to use one stream's BLOCKINFO to read another stream. 2014-08-30 17:07:55 +00:00
X86 Reduce verbiage of lit.local.cfg files 2014-06-09 22:42:55 +00:00
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 Using "not grep" is brittle as the test passes if llvm-as fails. 2012-11-21 14:17:23 +00:00
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 Update to remove the no-frame-pointer-elim-non-leaf flag if it was set to 'false'. 2013-08-22 21:28:54 +00:00
bcanalyzer-block-info.txt Teach llvm-bcanalyzer to use one stream's BLOCKINFO to read another stream. 2014-08-30 17:07:55 +00:00
can-execute.txt Suppress llvm/test/Other/can-execute.txt on msys bash. 2013-06-26 10:56:44 +00:00
close-stderr.ll llvm/test/Other/close-stderr.ll: Remove "XFAIL:win32". It reverts r173509. 2013-10-26 02:50:14 +00:00
constant-fold-gep-address-spaces.ll Teach ConstantFolding about pointer address spaces 2013-08-20 21:20:04 +00:00
constant-fold-gep.ll IR: Fold away compares between GV GEPs and GVs 2014-07-04 22:05:26 +00:00
extract-alias.ll Fix most of PR10367. 2014-05-16 19:35:39 +00:00
extract-linkonce.ll Add a fixed version of r195470 back. 2013-11-22 17:58:12 +00:00
extract-weak-odr.ll llvm-extract changes linkages so that functions on both sides of the 2012-10-29 01:59:03 +00:00
extract.ll llvm-extract changes linkages so that functions on both sides of the 2012-10-29 01:59:03 +00:00
FileCheck-space.txt
invalid-commandline-option.ll
lint.ll Ignore apparent buffer overruns on external or weak globals. This is a major 2012-09-30 07:30:10 +00:00
lit-unicode.txt [lit] Parse all strings as UTF-8 rather than ASCII. 2014-09-12 16:46:05 +00:00
llvm-nm-without-aliases.ll Change the default input for llvm-nm to be a.out instead of standard input 2014-06-23 20:27:53 +00:00
new-pass-manager.ll [PM] Fix a pretty nasty bug where the new pass manager would invalidate 2015-01-07 01:58:35 +00:00
optimization-remarks-inline.ll Do not make -pass-remarks additive. 2014-05-06 19:14:00 +00:00
optimize-options.ll Provide a test input for opt 2013-11-05 13:57:34 +00:00
pass-pipeline-parsing.ll [PM] Simplify how we parse the outer layer of the pass pipeline text and 2015-01-06 08:37:58 +00:00
pipefail.txt Use pipefail when available. 2013-07-26 22:32:58 +00:00
ResponseFile.ll [Support] Beef up and expose the response file parsing in llvm::cl 2013-07-18 16:52:05 +00:00
spir_cc.ll Forgot the SPIR test case. 2012-10-01 17:07:51 +00:00
umask.ll XFAIL this test on mingw. 2013-07-16 19:20:29 +00:00