1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-21 12:02:58 +02:00
llvm-mirror/include/llvm/Transforms/Scalar
Chandler Carruth a54116ca5c [PM] Fix a bug in the new loop PM when handling functions with no loops.
Without any loops, we don't even bother to build the standard analyses
used by loop passes. Without these, we can't run loop analyses or
invalidate them properly. Unfortunately, we did these things in the
wrong order which would allow a loop analysis manager's proxy to be
built but then not have the standard analyses built. When we went to do
the invalidation in the proxy thing would fall apart. In the test case
provided, it would actually crash.

The fix is to carefully check for loops first, and to in fact build the
standard analyses before building the proxy. This allows it to
correctly trigger invalidation for those standard analyses.

An alternative might seem to be  to look at whether there are any loops
when doing invalidation, but this doesn't work when during the loop
pipeline run we delete the last loop. I've even included that as a test
case. It is both simpler and more robust to defer building the proxy
until there are definitely the standard set of analyses and indeed
loops.

This bug was uncovered by enabling GlobalsAA in the pipeline.

llvm-svn: 294728
2017-02-10 08:26:58 +00:00
..
ADCE.h [PM] Remove support for omitting the AnalysisManager argument to new 2016-06-17 00:11:01 +00:00
AlignmentFromAssumptions.h Revert @llvm.assume with operator bundles (r289755-r289757) 2016-12-19 08:22:17 +00:00
BDCE.h [PM] Port BDCE to the new pass manager. 2016-05-25 01:57:04 +00:00
ConstantHoisting.h This implements a more optimal algorithm for selecting a base constant in 2016-07-14 07:44:20 +00:00
CorrelatedValuePropagation.h [PM] Port CorrelatedValuePropagation 2016-07-06 23:26:29 +00:00
DCE.h Consistently use FunctionAnalysisManager 2016-08-09 00:28:15 +00:00
DeadStoreElimination.h Consistently use FunctionAnalysisManager 2016-08-09 00:28:15 +00:00
EarlyCSE.h [EarlyCSE] Optionally use MemorySSA. NFC. 2016-08-31 19:24:10 +00:00
Float2Int.h Remove stray comment. NFC. 2016-06-28 00:14:09 +00:00
GuardWidening.h Consistently use FunctionAnalysisManager 2016-08-09 00:28:15 +00:00
GVN.h Revert @llvm.assume with operator bundles (r289755-r289757) 2016-12-19 08:22:17 +00:00
GVNExpression.h NewGVN: Fix PR 31686 and PR 31698 by rewriting store leader handling. 2017-01-20 21:04:30 +00:00
IndVarSimplify.h [PM] Separate the LoopAnalysisManager from the LoopPassManager and move 2017-01-11 09:43:56 +00:00
IVUsersPrinter.h [PM] Separate the LoopAnalysisManager from the LoopPassManager and move 2017-01-11 09:43:56 +00:00
JumpThreading.h [JumpThreading] Thread through guards 2017-02-09 19:40:22 +00:00
LICM.h [PM] Separate the LoopAnalysisManager from the LoopPassManager and move 2017-01-11 09:43:56 +00:00
LoopAccessAnalysisPrinter.h [PM] Separate the LoopAnalysisManager from the LoopPassManager and move 2017-01-11 09:43:56 +00:00
LoopDataPrefetch.h [Target, Transforms] Fix some Clang-tidy modernize and Include What You Use warnings; other minor fixes (NFC). 2017-01-18 00:57:48 +00:00
LoopDeletion.h [Target, Transforms] Fix some Clang-tidy modernize and Include What You Use warnings; other minor fixes (NFC). 2017-01-18 00:57:48 +00:00
LoopDistribute.h [LoopDist] Port to new PM 2016-07-18 16:29:27 +00:00
LoopIdiomRecognize.h [PM] Separate the LoopAnalysisManager from the LoopPassManager and move 2017-01-11 09:43:56 +00:00
LoopInstSimplify.h [PM] Separate the LoopAnalysisManager from the LoopPassManager and move 2017-01-11 09:43:56 +00:00
LoopLoadElimination.h [PM] Port LoopLoadElimination to the new pass manager and wire it into 2017-01-27 01:32:26 +00:00
LoopPassManager.h [PM] Fix a bug in the new loop PM when handling functions with no loops. 2017-02-10 08:26:58 +00:00
LoopPredication.h [Guards] Introduce loop-predication pass 2017-01-25 16:00:44 +00:00
LoopRotation.h [PM] Separate the LoopAnalysisManager from the LoopPassManager and move 2017-01-11 09:43:56 +00:00
LoopSimplifyCFG.h [PM] Separate the LoopAnalysisManager from the LoopPassManager and move 2017-01-11 09:43:56 +00:00
LoopSink.h [PM] Port LoopSink to the new pass manager. 2017-01-20 08:42:19 +00:00
LoopStrengthReduce.h [PM] Separate the LoopAnalysisManager from the LoopPassManager and move 2017-01-11 09:43:56 +00:00
LoopUnrollPass.h [PM] Simplify the new PM interface to the loop unroller and expose two 2017-01-26 02:13:50 +00:00
LowerAtomic.h [PM] Remove support for omitting the AnalysisManager argument to new 2016-06-17 00:11:01 +00:00
LowerExpectIntrinsic.h [PM] Remove support for omitting the AnalysisManager argument to new 2016-06-17 00:11:01 +00:00
LowerGuardIntrinsic.h [PM] Port LowerGuardIntrinsic to the new PM. 2016-07-28 22:08:41 +00:00
MemCpyOptimizer.h [Target, Transforms] Fix some Clang-tidy modernize and Include What You Use warnings; other minor fixes (NFC). 2017-01-18 00:57:48 +00:00
MergedLoadStoreMotion.h Consistently use FunctionAnalysisManager 2016-08-09 00:28:15 +00:00
NaryReassociate.h Revert @llvm.assume with operator bundles (r289755-r289757) 2016-12-19 08:22:17 +00:00
NewGVN.h [GVN] Initial check-in of a new global value numbering algorithm. 2016-12-22 16:03:48 +00:00
PartiallyInlineLibCalls.h Consistently use FunctionAnalysisManager 2016-08-09 00:28:15 +00:00
Reassociate.h [Reassociate] Skip analysis of dead code to avoid infinite loop. 2016-11-02 08:55:19 +00:00
SCCP.h Consistently use FunctionAnalysisManager 2016-08-09 00:28:15 +00:00
SimplifyCFG.h Consistently use FunctionAnalysisManager 2016-08-09 00:28:15 +00:00
Sink.h Consistently use FunctionAnalysisManager 2016-08-09 00:28:15 +00:00
SpeculativeExecution.h [PM] Port SpeculativeExecution to the new PM 2016-08-01 21:48:33 +00:00
SROA.h [Target, Transforms] Fix some Clang-tidy modernize and Include What You Use warnings; other minor fixes (NFC). 2017-01-18 00:57:48 +00:00
TailRecursionElimination.h [PM] Port TailCallElim 2016-07-06 23:48:41 +00:00