mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-13 04:38:24 +00:00
Change PHINode::hasConstantValue to have a DominatorTree argument
instead of a bool argument, and to do the dominator check itself. This makes it eaiser to use when DominatorTree information is available. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80920 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -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; }
|
||||
|
Reference in New Issue
Block a user