1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-22 18:54:02 +01:00
llvm-mirror/lib/Transforms/Scalar
Karl-Johan Karlsson a8fe405273 [NaryReassociate] Detect deleted instr with WeakVH
Summary:
If NaryReassociate succeed it will, when replacing the old instruction
with the new instruction, also recursively delete trivially
dead instructions from the old instruction. However, if the input to the
NaryReassociate pass contain dead code it is not save to recursively
delete trivially deadinstructions as it might lead to deleting the newly
created instruction.

This patch will fix the problem by using WeakVH to detect this
rare case, when the newly created instruction is dead, and it will then
restart the basic block iteration from the beginning.

This fixes pr37539

Reviewers: tra, meheff, grosser, sanjoy

Reviewed By: sanjoy

Subscribers: llvm-commits

Differential Revision: https://reviews.llvm.org/D47139

llvm-svn: 333155
2018-05-24 06:09:02 +00:00
..
ADCE.cpp Rename DEBUG macro to LLVM_DEBUG. 2018-05-14 12:53:11 +00:00
AlignmentFromAssumptions.cpp Rename DEBUG macro to LLVM_DEBUG. 2018-05-14 12:53:11 +00:00
BDCE.cpp Rename DEBUG macro to LLVM_DEBUG. 2018-05-14 12:53:11 +00:00
CallSiteSplitting.cpp Rename DEBUG macro to LLVM_DEBUG. 2018-05-14 12:53:11 +00:00
CMakeLists.txt
ConstantHoisting.cpp Rename DEBUG macro to LLVM_DEBUG. 2018-05-14 12:53:11 +00:00
ConstantProp.cpp
CorrelatedValuePropagation.cpp [CVP] Require DomTree for new Pass Manager 2018-05-21 11:06:28 +00:00
DCE.cpp
DeadStoreElimination.cpp Rename DEBUG macro to LLVM_DEBUG. 2018-05-14 12:53:11 +00:00
DivRemPairs.cpp
EarlyCSE.cpp [EarlyCSE] Improve EarlyCSE of some absolute value cases. 2018-05-21 18:42:42 +00:00
FlattenCFGPass.cpp
Float2Int.cpp Rename DEBUG macro to LLVM_DEBUG. 2018-05-14 12:53:11 +00:00
GuardWidening.cpp Rename DEBUG macro to LLVM_DEBUG. 2018-05-14 12:53:11 +00:00
GVN.cpp Rename DEBUG macro to LLVM_DEBUG. 2018-05-14 12:53:11 +00:00
GVNHoist.cpp [STLExtras] Add size() for ranges, and remove distance() 2018-05-16 23:20:42 +00:00
GVNSink.cpp Rename DEBUG macro to LLVM_DEBUG. 2018-05-14 12:53:11 +00:00
InductiveRangeCheckElimination.cpp [IRCE] Fix miscompile with range checks against negative values 2018-05-19 13:06:37 +00:00
IndVarSimplify.cpp Rename DEBUG macro to LLVM_DEBUG. 2018-05-14 12:53:11 +00:00
InferAddressSpaces.cpp Rename DEBUG macro to LLVM_DEBUG. 2018-05-14 12:53:11 +00:00
IVUsersPrinter.cpp
JumpThreading.cpp Rename DEBUG macro to LLVM_DEBUG. 2018-05-14 12:53:11 +00:00
LICM.cpp Rename DEBUG macro to LLVM_DEBUG. 2018-05-14 12:53:11 +00:00
LLVMBuild.txt
LoopAccessAnalysisPrinter.cpp
LoopDataPrefetch.cpp Rename DEBUG macro to LLVM_DEBUG. 2018-05-14 12:53:11 +00:00
LoopDeletion.cpp Rename DEBUG macro to LLVM_DEBUG. 2018-05-14 12:53:11 +00:00
LoopDistribute.cpp Rename DEBUG macro to LLVM_DEBUG. 2018-05-14 12:53:11 +00:00
LoopIdiomRecognize.cpp Rename DEBUG macro to LLVM_DEBUG. 2018-05-14 12:53:11 +00:00
LoopInterchange.cpp Rename DEBUG macro to LLVM_DEBUG. 2018-05-14 12:53:11 +00:00
LoopLoadElimination.cpp Rename DEBUG macro to LLVM_DEBUG. 2018-05-14 12:53:11 +00:00
LoopPassManager.cpp
LoopPredication.cpp Rename DEBUG macro to LLVM_DEBUG. 2018-05-14 12:53:11 +00:00
LoopRerollPass.cpp Rename DEBUG macro to LLVM_DEBUG. 2018-05-14 12:53:11 +00:00
LoopRotation.cpp
LoopSimplifyCFG.cpp
LoopSink.cpp Rename DEBUG macro to LLVM_DEBUG. 2018-05-14 12:53:11 +00:00
LoopStrengthReduce.cpp Fix LSR compile time hang. 2018-05-16 02:48:50 +00:00
LoopUnrollPass.cpp Rename DEBUG macro to LLVM_DEBUG. 2018-05-14 12:53:11 +00:00
LoopUnswitch.cpp [LoopUnswitch] Fix SCEV invalidation in unswitching 2018-05-23 10:09:53 +00:00
LoopVersioningLICM.cpp Rename DEBUG macro to LLVM_DEBUG. 2018-05-14 12:53:11 +00:00
LowerAtomic.cpp
LowerExpectIntrinsic.cpp
LowerGuardIntrinsic.cpp
MemCpyOptimizer.cpp Rename DEBUG macro to LLVM_DEBUG. 2018-05-14 12:53:11 +00:00
MergedLoadStoreMotion.cpp [STLExtras] Add size() for ranges, and remove distance() 2018-05-16 23:20:42 +00:00
MergeICmps.cpp [MergeICmps] Don't crash when memcmp is not available 2018-05-19 12:51:59 +00:00
NaryReassociate.cpp [NaryReassociate] Detect deleted instr with WeakVH 2018-05-24 06:09:02 +00:00
NewGVN.cpp [NewGVN] Fix handling of assumes 2018-05-22 17:38:22 +00:00
PartiallyInlineLibCalls.cpp
PlaceSafepoints.cpp Rename DEBUG macro to LLVM_DEBUG. 2018-05-14 12:53:11 +00:00
Reassociate.cpp Rename DEBUG macro to LLVM_DEBUG. 2018-05-14 12:53:11 +00:00
Reg2Mem.cpp
RewriteStatepointsForGC.cpp Fix up a few grammar issues. 2018-05-21 10:27:36 +00:00
Scalar.cpp
Scalarizer.cpp
SCCP.cpp Rename DEBUG macro to LLVM_DEBUG. 2018-05-14 12:53:11 +00:00
SeparateConstOffsetFromGEP.cpp [Split GEP] handle trunc() in separate-const-offset-from-gep pass. 2018-05-11 21:13:19 +00:00
SimpleLoopUnswitch.cpp Rename DEBUG macro to LLVM_DEBUG. 2018-05-14 12:53:11 +00:00
SimplifyCFGPass.cpp
Sink.cpp Rename DEBUG macro to LLVM_DEBUG. 2018-05-14 12:53:11 +00:00
SpeculateAroundPHIs.cpp Rename DEBUG macro to LLVM_DEBUG. 2018-05-14 12:53:11 +00:00
SpeculativeExecution.cpp Rename DEBUG macro to LLVM_DEBUG. 2018-05-14 12:53:11 +00:00
SROA.cpp [SROA] Handle PHI with multiple duplicate predecessors 2018-05-17 07:21:41 +00:00
StraightLineStrengthReduce.cpp
StructurizeCFG.cpp StructurizeCFG: Adjust the loop depth for a subregion to order the nodes correctly 2018-05-23 18:34:48 +00:00
TailRecursionElimination.cpp Rename DEBUG macro to LLVM_DEBUG. 2018-05-14 12:53:11 +00:00