Boost the power of phi node constant folding slightly: if all
authorDuncan Sands <baldrick@free.fr>
Sun, 14 Nov 2010 12:53:18 +0000 (12:53 +0000)
committerDuncan Sands <baldrick@free.fr>
Sun, 14 Nov 2010 12:53:18 +0000 (12:53 +0000)
commitc0362d5c6e0066c741bce056a65d8b4c026de19f
tree92c313f034ac5726e8c5588b5958fc0d8ec4b34a
parentb08ca275bdc5222001158f7c65195de4163ba84c
Boost the power of phi node constant folding slightly: if all
operands are the phi node itself or undef, then return undef.
This logic already existed at a higher level so in practice it
shouldn't make the slightest difference.  Note that this code
could be replaced by a call to PN->hasConstantValue().  However
since we bail out the moment we see a non-constant operand, it
is more efficient to have a specialized version of that logic.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119041 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Analysis/ConstantFolding.cpp