llvm-project/llvm/lib/Transforms/Scalar
Adrian Prantl 9232ca4712 Improve the effectiveness of BDCE's debug info salvaging
This patch improves the effectiveness of BDCE's debug info salvaging
by processing the instructions in reverse order and delaying
dropAllReferences until after debug info salvaging. This allows
salvaging of entire chains of deleted instructions!

Previously we would remove all references from an instruction, which
would make it impossible to use that instruction to salvage a later
instruction in the instruction stream, because its operands were
already removed.

This reapplies the previous patch with a fix for a use-after-free.

Differential Revision: https://reviews.llvm.org/D110568
2021-09-30 09:28:49 -07:00
..
ADCE.cpp Improve the effectiveness of ADCE's debug info salvaging 2021-09-28 10:24:50 -07: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 Improve the effectiveness of BDCE's debug info salvaging 2021-09-30 09:28:49 -07:00
CMakeLists.txt Add jump-threading optimization for deterministic finite automata 2021-07-27 14:34:04 -04:00
CallSiteSplitting.cpp [Scalar] Use make_early_inc_range (NFC) 2021-09-12 08:17:18 -07:00
ConstantHoisting.cpp [ConstantHoisting] Support opaque pointers 2021-09-08 21:23:10 +02:00
ConstraintElimination.cpp [ConstraintElimination] Initial support for using info from assumes. 2021-08-26 10:08:00 +01:00
CorrelatedValuePropagation.cpp Revert "Recommit "Revert "[CVP] processSwitch: Remove default case when switch cover all possible values.""" 2021-09-27 20:39:05 +08:00
DCE.cpp [Scalar] Use range-based for loops (NFC) 2021-02-25 19:54:38 -08:00
DFAJumpThreading.cpp [llvm] Use pop_back_val (NFC) 2021-09-19 13:44:23 -07:00
DeadStoreElimination.cpp [DSE] Don't check getUnderlyingObject() return value (NFC) 2021-09-26 18:01:26 +02:00
DivRemPairs.cpp [DivRemPairs] make sure we have a valid CFG for hoisting division 2021-07-28 11:09:12 -04:00
EarlyCSE.cpp [NPM] Added -print-pipeline-passes print params for a few passes. 2021-09-15 08:34:04 +02:00
FlattenCFGPass.cpp
Float2Int.cpp [APInt] Normalize naming on keep constructors / predicate methods. 2021-09-09 09:50:24 -07:00
GVN.cpp [IR] Return AAMDNodes from Instruction::getMetadata() (NFC) 2021-09-16 21:06:57 +02: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 [IndVarSimplify] Forget phi value after changing incoming value. 2021-09-29 14:44:13 +01: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 Re-apply "[JumpThreading] Ignore free instructions" 2021-09-24 18:52:30 +02:00
LICM.cpp [llvm] Migrate from arg_operands to args (NFC) 2021-09-30 08:51:21 -07:00
LoopAccessAnalysisPrinter.cpp
LoopBoundSplit.cpp [LoopBoundSplit] Check the start value of split cond AddRec 2021-09-13 10:32:35 +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 [BPI] Keep BPI available in loop passes through LoopStandardAnalysisResults 2021-09-30 10:27:05 -04:00
LoopFlatten.cpp [LoopFlatten] Bail if we can't perform flattening after IV widening 2021-09-29 19:53:34 +01:00
LoopFuse.cpp [ADT] Remove StatisticBase and make NoopStatistic empty 2021-04-26 16:47:32 -07:00
LoopIdiomRecognize.cpp [LoopIdiomRecognize][Remarks] Track loop-strided store to/from blocks 2021-09-16 15:46:26 -07:00
LoopInstSimplify.cpp [Scalar] Use make_early_inc_range (NFC) 2021-09-12 08:17:18 -07: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 [BPI] Keep BPI available in loop passes through LoopStandardAnalysisResults 2021-09-30 10:27:05 -04:00
LoopPassManager.cpp [BPI] Keep BPI available in loop passes through LoopStandardAnalysisResults 2021-09-30 10:27:05 -04:00
LoopPredication.cpp [LoopPredication] Remove unused variable 2021-09-30 10:40:47 -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 [LSR] Make sure that Factor fits into Base type 2021-09-21 20:50:50 +03: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 [NPM] Added -print-pipeline-passes print params for a few passes. 2021-09-15 08:34:04 +02:00
LoopUnswitch.cpp [Analysis, Target, Transforms] Construct SmallVector with iterator ranges (NFC) 2021-09-07 09:19:33 -07:00
LoopVersioningLICM.cpp
LowerAtomic.cpp [NVPTX] Enable lowering of atomics on local memory 2021-04-26 20:12:12 -04:00
LowerConstantIntrinsics.cpp [LowerConstantIntrinsics] Fix heap-use-after-free bug in worklist 2021-09-21 11:33:07 +02:00
LowerExpectIntrinsic.cpp [TargetTransformInfo] move branch probability query from TargetLoweringInfo 2021-03-22 15:55:34 -04:00
LowerGuardIntrinsic.cpp
LowerMatrixIntrinsics.cpp [NPM] Added -print-pipeline-passes print params for a few passes. 2021-09-15 08:34:04 +02:00
LowerWidenableCondition.cpp
MakeGuardsExplicit.cpp
MemCpyOptimizer.cpp [MemCpyOpt] Fix a variety of scalable-type crashes 2021-09-08 11:21:36 +01:00
MergeICmps.cpp [MergeICmps] Remove unused NumMerged variable 2021-09-21 21:43:25 +02:00
MergedLoadStoreMotion.cpp [NPM] Added -print-pipeline-passes print params for a few passes. 2021-09-15 08:34:04 +02: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 [InstSimplify] Don't lose inbounds when simplifying a GEP 2021-09-23 09:25:06 +01:00
PartiallyInlineLibCalls.cpp [NFC] More get/removeAttribute() cleanup 2021-08-17 21:05:41 -07:00
PlaceSafepoints.cpp
Reassociate.cpp [APInt] Normalize naming on keep constructors / predicate methods. 2021-09-09 09:50:24 -07:00
Reg2Mem.cpp
RewriteStatepointsForGC.cpp RewriteStatepointsForGC - Use const-ref iterator in for-range loops. NFCI. 2021-09-21 13:01:08 +01:00
SCCP.cpp [Scalar] Use make_early_inc_range (NFC) 2021-09-12 08:17:18 -07:00
SROA.cpp [IR] Add helper to convert offset to GEP indices 2021-09-20 20:18:16 +02:00
Scalar.cpp Add jump-threading optimization for deterministic finite automata 2021-07-27 14:34:04 -04:00
ScalarizeMaskedMemIntrin.cpp [llvm] Migrate from arg_operands to args (NFC) 2021-09-30 08:51:21 -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 SeparateConstOffsetFromGEP: Fix stack overflow in unreachable code 2021-09-14 19:49:38 -04:00
SimpleLoopUnswitch.cpp [NPM] Added -print-pipeline-passes print params for a few passes. 2021-09-15 08:34:04 +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 [Transforms/Scalar] Use range-based for loops (NFC) 2021-02-04 21:18:05 -08:00
StructurizeCFG.cpp [Scalar] Use range-based for loops (NFC) 2021-02-25 19:54:38 -08:00
TailRecursionElimination.cpp [llvm] Migrate from arg_operands to args (NFC) 2021-09-30 08:51:21 -07:00
WarnMissedTransforms.cpp