diff options
Diffstat (limited to 'include/llvm/Instructions.h')
-rw-r--r-- | include/llvm/Instructions.h | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/include/llvm/Instructions.h b/include/llvm/Instructions.h index e6f1c54483..71f4738528 100644 --- a/include/llvm/Instructions.h +++ b/include/llvm/Instructions.h @@ -31,6 +31,7 @@ class ConstantInt; class ConstantRange; class APInt; class LLVMContext; +class DominatorTree; //===----------------------------------------------------------------------===// // AllocationInst Class @@ -1950,7 +1951,12 @@ public: /// hasConstantValue - If the specified PHI node always merges together the /// same value, return the value, otherwise return null. /// - Value *hasConstantValue(bool AllowNonDominatingInstruction = false) const; + /// If the PHI has undef operands, but all the rest of the operands are + /// some unique value, return that value if it can be proved that the + /// value dominates the PHI. If DT is null, use a conservative check, + /// otherwise use DT to test for dominance. + /// + Value *hasConstantValue(DominatorTree *DT = 0) const; /// Methods for support type inquiry through isa, cast, and dyn_cast: static inline bool classof(const PHINode *) { return true; } |