1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-20 03:23:01 +02:00
llvm-mirror/lib/Transforms
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
..
AggressiveInstCombine [AggressiveInstCombine] avoid crashing on unsimplified code (PR37446) 2018-05-14 13:43:32 +00:00
Coroutines Rename DEBUG macro to LLVM_DEBUG. 2018-05-14 12:53:11 +00:00
Hello
InstCombine [InstCombine] Fold unfolded masked merge pattern with variable mask! 2018-05-23 17:47:52 +00:00
Instrumentation [msan] Don't check divisor shadow in fdiv. 2018-05-18 20:19:53 +00:00
IPO [Dominators] Add PDT constructor from Function 2018-05-23 17:29:21 +00:00
ObjCARC [WebAssembly] Add Wasm personality and isScopedEHPersonality() 2018-05-17 20:52:03 +00:00
Scalar [NaryReassociate] Detect deleted instr with WeakVH 2018-05-24 06:09:02 +00:00
Utils [InstCombine] use nsw negation for abs libcalls 2018-05-22 23:29:40 +00:00
Vectorize Remove DEBUG macro. 2018-05-23 15:09:29 +00:00
CMakeLists.txt Another try to commit 323321 (aggressive instruction combine). 2018-01-25 12:06:32 +00:00
LLVMBuild.txt Another try to commit 323321 (aggressive instruction combine). 2018-01-25 12:06:32 +00:00