1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-19 19:12:56 +02:00
llvm-mirror/lib/Transforms
Davide Italiano d4d99b33ee [CVP] Replace incoming values from unreachable blocks with undef.
This is an attempt of fixing PR35807.
Due to the non-standard definition of dominance in LLVM, where uses in
unreachable blocks are dominated by anything, you can have, in an
unreachable block:

  %patatino = OP1 %patatino, CONSTANT

When `SimplifyInstruction` receives a PHI where an incoming value is of
the aforementioned form, in some cases, loops indefinitely.

What I propose here instead is keeping track of the incoming values
from unreachable blocks, and replacing them with undef. It fixes this
case, and it seems to be good regardless (even if we can't prove that
the value is constant, as it's coming from an unreachable block, we
can ignore it).

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

llvm-svn: 322006
2018-01-08 16:34:06 +00:00
..
Coroutines Use phi ranges to simplify code. No functionality change intended. 2017-12-30 15:27:33 +00:00
Hello
InstCombine [InstCombine] fold min/max tree with common operand (PR35717) 2018-01-08 15:05:34 +00:00
Instrumentation Avoid int to string conversion in Twine or raw_ostream contexts. 2017-12-28 16:58:54 +00:00
IPO WholeProgramDevirt: Simplify ORE getter mechanism for old PM. NFCI. 2018-01-05 00:27:51 +00:00
ObjCARC Remove redundant includes from lib/Transforms. 2017-12-13 21:31:01 +00:00
Scalar [CVP] Replace incoming values from unreachable blocks with undef. 2018-01-08 16:34:06 +00:00
Utils [CodeExtractor] Use subset of function attributes for extracted function. 2018-01-07 11:22:25 +00:00
Vectorize [SLP] Fix PR35777: Incorrect handling of aggregate values. 2018-01-08 14:43:06 +00:00
CMakeLists.txt
LLVMBuild.txt