llvm-project/llvm/lib/Transforms/InstCombine
Silviu Baranga b892e35520 [InstCombine] Teach instcombine not to create extra PHI nodes when folding GEPs
Summary:
InstCombine tries to transform GEP(PHI(GEP1, GEP2, ..)) into GEP(GEP(PHI(...))
when possible. However, this may leave the old PHI node around. Even if we
do end up folding the GEPs, having an extra PHI node might not be beneficial.

This change makes the transformation more conservative. We now only do this if
the PHI has only one use, and can therefore be removed after the transformation.

Reviewers: jmolloy, majnemer

Subscribers: mcrosier, mssimpso, llvm-commits

Differential Revision: http://reviews.llvm.org/D13887

llvm-svn: 251281
2015-10-26 10:25:05 +00:00
..
CMakeLists.txt Use ADDITIONAL_HEADER_DIRS in all LLVM CMake projects. 2015-02-11 03:28:02 +00:00
InstCombineAddSub.cpp don't repeat function names in comments; NFC 2015-09-09 15:24:36 +00:00
InstCombineAndOrXor.cpp [InstCombine] transform masking off of an FP sign bit into a fabs() intrinsic call (PR24886) 2015-10-08 17:09:31 +00:00
InstCombineCalls.cpp [InstCombine] SSE4A constant folding and conversion to shuffles. 2015-10-17 11:40:05 +00:00
InstCombineCasts.cpp InstCombine: Remove ilist iterator implicit conversions, NFC 2015-10-13 16:59:33 +00:00
InstCombineCompares.cpp [InstCombine] Optimize icmp of inc/dec at RHS 2015-10-19 22:08:14 +00:00
InstCombineInternal.h InstCombine: Remove ilist iterator implicit conversions, NFC 2015-10-13 16:59:33 +00:00
InstCombineLoadStoreAlloca.cpp InstCombine: Remove ilist iterator implicit conversions, NFC 2015-10-13 16:59:33 +00:00
InstCombineMulDivRem.cpp InstCombine: Remove ilist iterator implicit conversions, NFC 2015-10-13 16:59:33 +00:00
InstCombinePHI.cpp InstCombine: Remove ilist iterator implicit conversions, NFC 2015-10-13 16:59:33 +00:00
InstCombineSelect.cpp don't repeat function names in comments; NFC 2015-09-09 15:24:36 +00:00
InstCombineShifts.cpp Convert PHI getIncomingValue() to foreach over incoming_values(). NFC. 2015-05-12 20:05:31 +00:00
InstCombineSimplifyDemanded.cpp [InstCombine] Teach SimplifyDemandedVectorElts how to handle ConstantVector select masks with ConstantExpr elements (PR24922) 2015-10-06 10:34:53 +00:00
InstCombineVectorOps.cpp InstCombine: Remove ilist iterator implicit conversions, NFC 2015-10-13 16:59:33 +00:00
InstructionCombining.cpp [InstCombine] Teach instcombine not to create extra PHI nodes when folding GEPs 2015-10-26 10:25:05 +00:00
LLVMBuild.txt Update libdeps since TLI was moved from Target to Analysis in r226078. 2015-01-15 05:21:00 +00:00
Makefile