llvm-project/llvm/lib/Transforms
Bjorn Pettersson 51cebc98f3 [LCSSA] Do not remove used PHI nodes in formLCSSAForInstructions
Summary:
In formLCSSAForInstructions we speculatively add new PHI
nodes, that sometimes ends up without having any uses. It
has been discovered that sometimes an added PHI node can
appear as being unused in one iteration of the Worklist,
although it can end up being used by a PHI node added in
a later iteration. We now check, a second time, that the
PHI node still is unused before we remove it. This avoids
an assert about "Trying to remove a phi with uses." for the
added test case.

Reviewers: davide, mzolotukhin, mattd, dberlin

Reviewed By: mzolotukhin, dberlin

Subscribers: dberlin, mzolotukhin, davide, bjope, uabelho, llvm-commits

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

llvm-svn: 331741
2018-05-08 06:59:47 +00:00
..
AggressiveInstCombine Fix '32-bit shift implicitly converted to 64 bits' warning by using APInt::setBit instead. 2018-05-02 14:22:30 +00:00
Coroutines IWYU for llvm-config.h in llvm, additions. 2018-04-30 14:59:11 +00:00
Hello
IPO [NewPM] Emit inliner NoDefinition missed optimization remark 2018-05-08 01:45:46 +00:00
InstCombine Fix a bunch of places where operator-> was used directly on the return from dyn_cast. 2018-05-05 01:57:00 +00:00
Instrumentation [gcov] Switch to an explicit if clunky array to satisfy some compilers 2018-05-03 00:11:03 +00:00
ObjCARC [ObjCARC] Account for catchswitch in bitcast insertion 2018-05-04 19:03:11 +00:00
Scalar [LICM] Compute a must execute property for the prefix of the header as we go 2018-05-04 21:35:00 +00:00
Utils [LCSSA] Do not remove used PHI nodes in formLCSSAForInstructions 2018-05-08 06:59:47 +00:00
Vectorize Fix a bunch of places where operator-> was used directly on the return from dyn_cast. 2018-05-05 01:57:00 +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