llvm-project/llvm/lib/Transforms/Scalar
Bjorn Pettersson 0f0344dd1e [SimpleLoopUnswitch] Inform pass manager when child loops are deleted
As part of the nontrivial unswitching we could end up removing child
loops. This patch add a notification to the pass manager when
that happens (using the markLoopAsDeleted callback).

Without this there could be stale LoopAccessAnalysis results cached
in the analysis manager. Those analysis results are cached based on
a Loop* as key. Since the BumpPtrAllocator used to allocate
Loop objects could be resetted between different runs of for
example the loop-distribute pass (running on different functions),
a new Loop object could be created using the same Loop pointer.
And then when requiring the LoopAccessAnalysis for the loop we
got the stale (corrupt) result from the destroyed loop.

Reviewed By: aeubanks

Differential Revision: https://reviews.llvm.org/D109257
2021-09-04 17:54:39 +02:00
..
ADCE.cpp [IR] Consider non-willreturn as side effect (PR50511) 2021-07-26 16:35:14 +02:00
AlignmentFromAssumptions.cpp [AlignFromAssume] Bailout w/non-constant alignments (pr51680) 2021-08-31 09:20:52 -07:00
AnnotationRemarks.cpp [Remarks] Add analysis remarks for memset/memcpy/memmove lengths 2021-05-24 10:10:44 -07:00
BDCE.cpp [NewPM] Don't mark AA analyses as preserved 2021-05-18 13:49:03 -07:00
CMakeLists.txt Add jump-threading optimization for deterministic finite automata 2021-07-27 14:34:04 -04:00
CallSiteSplitting.cpp
ConstantHoisting.cpp [TTI] NFC: Change getIntImmCost[Inst|Intrin] to return InstructionCost 2021-04-23 16:06:36 +01:00
ConstraintElimination.cpp [ConstraintElimination] Initial support for using info from assumes. 2021-08-26 10:08:00 +01:00
CorrelatedValuePropagation.cpp Revert "[CVP] processSwitch: Remove default case when switch cover all possible values." 2021-08-19 08:43:51 -04:00
DCE.cpp [Scalar] Use range-based for loops (NFC) 2021-02-25 19:54:38 -08:00
DFAJumpThreading.cpp MainSwitch::isValidSelectInst - don't dereference dyn_cast<> results. 2021-08-20 14:31:11 +01:00
DeadStoreElimination.cpp [DSE] Check post-dominance for malloc+memset->calloc transform. 2021-08-23 12:39:51 -07:00
DivRemPairs.cpp [DivRemPairs] make sure we have a valid CFG for hoisting division 2021-07-28 11:09:12 -04:00
EarlyCSE.cpp [FPEnv] EarlyCSE support for constrained intrinsics, default FP environment edition 2021-05-20 14:40:51 -04:00
FlattenCFGPass.cpp
Float2Int.cpp [NFCI] Move DEBUG_TYPE definition below #includes 2021-05-30 17:31:01 +08:00
GVN.cpp [GVN] Execute performLoopLoadPRE ahead of PerformLoadPRE 2021-08-24 09:50:27 +01:00
GVNHoist.cpp PR46874: Reset stack after visiting a node 2021-08-20 11:25:05 -07:00
GVNSink.cpp [NewPM] Don't mark AA analyses as preserved 2021-05-18 13:49:03 -07:00
GuardWidening.cpp [GuardWidening] Preserve MemorySSA 2021-08-19 20:23:17 +02:00
IVUsersPrinter.cpp
IndVarSimplify.cpp [IndVars] Don't check for pointer exit count (NFC) 2021-08-15 16:49:30 +02:00
InductiveRangeCheckElimination.cpp [NFC][NewPM] Remove some AnalysisManager invalidate methods 2021-04-15 16:51:26 -07:00
InferAddressSpaces.cpp [infer-address-spaces] Handle complex non-pointer constexpr arguments. 2021-07-19 12:15:52 -07:00
InstSimplifyPass.cpp
JumpThreading.cpp [CSSPGO] Undoing the concept of dangling pseudo probe 2021-06-18 15:14:11 -07:00
LICM.cpp [LICM] Remove AST-based implementation 2021-08-18 20:21:53 +02:00
LoopAccessAnalysisPrinter.cpp
LoopBoundSplit.cpp [LoopBoundSplit] Update phi node in exit block 2021-09-03 09:10:50 +01:00
LoopDataPrefetch.cpp [LoopDataPrefetch] Add missed LoopSimplify dependence for prefetch pass 2021-08-26 21:01:59 +08:00
LoopDeletion.cpp [LoopDeletion] Move ICmpInst handling to getValueOnFirstIteration() 2021-09-03 18:36:19 +07:00
LoopDistribute.cpp [NewPM] Don't mark AA analyses as preserved 2021-05-18 13:49:03 -07:00
LoopFlatten.cpp [LoopFlatten] Add statistic for number of loops flattened. NFC 2021-08-25 10:10:10 +01:00
LoopFuse.cpp [ADT] Remove StatisticBase and make NoopStatistic empty 2021-04-26 16:47:32 -07:00
LoopIdiomRecognize.cpp [LoopIdiom] Don't transform loop into memmove when load from body has more than one use 2021-08-25 14:22:40 +02:00
LoopInstSimplify.cpp [MemorySSA] Remove -enable-mssa-loop-dependency option 2021-08-16 20:59:37 +02:00
LoopInterchange.cpp [LoopInterchange] Check lcssa phis in the inner latch in scenarios of multi-level nested loops 2021-07-16 11:59:20 -04:00
LoopLoadElimination.cpp [MemorySSA] Remove unnecessary MSSA dependencies 2021-08-16 20:40:55 +02:00
LoopPassManager.cpp [NPM] Added opt option -print-pipeline-passes. 2021-09-02 08:23:33 +02:00
LoopPredication.cpp [LoopPredication] Fix MemorySSA crash in predicateLoopExits 2021-09-02 21:26:07 -04:00
LoopRerollPass.cpp [LoopReroll] Add an extra defensive check to avoid SCEV assertion. 2021-07-13 12:17:09 -07:00
LoopRotation.cpp [MemorySSA] Remove -enable-mssa-loop-dependency option 2021-08-16 20:59:37 +02:00
LoopSimplifyCFG.cpp [MemorySSA] Remove -enable-mssa-loop-dependency option 2021-08-16 20:59:37 +02:00
LoopSink.cpp [llvm] Use set_is_subset (NFC) 2021-02-28 10:59:20 -08:00
LoopStrengthReduce.cpp {DebugInfo][LSR] Don't cache dbg.value that are already undef 2021-08-05 19:16:43 +01:00
LoopUnrollAndJamPass.cpp [BasicTTIImpl][LoopUnroll] getUnrollingPreferences(): emit ORE remark when advising against unrolling due to a call in a loop 2021-08-03 00:57:26 +03:00
LoopUnrollPass.cpp Reapply: [NFC] factor out unrolling decision logic 2021-08-18 12:04:33 -07:00
LoopUnswitch.cpp [MemorySSA] Remove -enable-mssa-loop-dependency option 2021-08-16 20:59:37 +02:00
LoopVersioningLICM.cpp
LowerAtomic.cpp [NVPTX] Enable lowering of atomics on local memory 2021-04-26 20:12:12 -04:00
LowerConstantIntrinsics.cpp [NewPM] Don't mark AA analyses as preserved 2021-05-18 13:49:03 -07:00
LowerExpectIntrinsic.cpp [TargetTransformInfo] move branch probability query from TargetLoweringInfo 2021-03-22 15:55:34 -04:00
LowerGuardIntrinsic.cpp
LowerMatrixIntrinsics.cpp Recommit "[Matrix] Overload stride arg in matrix.columnwise.load/store." 2021-08-12 18:31:57 +01:00
LowerWidenableCondition.cpp
MakeGuardsExplicit.cpp
MemCpyOptimizer.cpp [MemCpyOpt] Allow specifying --enable-memcpyopt-without-libcalls more than once 2021-08-30 13:55:55 -07:00
MergeICmps.cpp [MergeICmps] Ignore clobbering instructions before the loads 2021-08-27 23:31:35 +02:00
MergedLoadStoreMotion.cpp [NewPM] Don't mark AA analyses as preserved 2021-05-18 13:49:03 -07:00
NaryReassociate.cpp [NARY] Don't optimize min/max if there are side uses (part2) 2021-04-30 19:02:02 +07:00
NewGVN.cpp [NewPM] Don't mark AA analyses as preserved 2021-05-18 13:49:03 -07:00
PartiallyInlineLibCalls.cpp [NFC] More get/removeAttribute() cleanup 2021-08-17 21:05:41 -07:00
PlaceSafepoints.cpp
Reassociate.cpp [NewPM] Don't mark AA analyses as preserved 2021-05-18 13:49:03 -07:00
Reg2Mem.cpp
RewriteStatepointsForGC.cpp [NFC] Use newly introduced *AtIndex methods 2021-09-01 11:18:41 -07:00
SCCP.cpp [NFC] More get/removeAttribute() cleanup 2021-08-17 21:05:41 -07:00
SROA.cpp Reapply "SROA: Enhance speculateSelectInstLoads" 2021-08-11 22:58:54 -04:00
Scalar.cpp Add jump-threading optimization for deterministic finite automata 2021-07-27 14:34:04 -04:00
ScalarizeMaskedMemIntrin.cpp [ScalarizeMaskedMemIntrin][SelectionDAGBuilder] Use the element type to calculate alignment for gather/scatter when alignment operand is 0. 2021-07-01 19:08:47 -07:00
Scalarizer.cpp Update @llvm.powi to handle different int sizes for the exponent 2021-06-17 09:38:28 +02:00
SeparateConstOffsetFromGEP.cpp
SimpleLoopUnswitch.cpp [SimpleLoopUnswitch] Inform pass manager when child loops are deleted 2021-09-04 17:54:39 +02:00
SimplifyCFGPass.cpp [NPM] Added opt option -print-pipeline-passes. 2021-09-02 08:23:33 +02:00
Sink.cpp [CSSPGO] Unblock optimizations with pseudo probe instrumentation part 2. 2021-04-26 16:52:33 -07:00
SpeculativeExecution.cpp [NewPM] Don't mark AA analyses as preserved 2021-05-18 13:49:03 -07:00
StraightLineStrengthReduce.cpp
StructurizeCFG.cpp [Scalar] Use range-based for loops (NFC) 2021-02-25 19:54:38 -08:00
TailRecursionElimination.cpp [OpaquePtr] Cleanup some uses of getPointerElementType() in TailRecursionElimination 2021-09-01 14:24:47 -07:00
WarnMissedTransforms.cpp