Skip to content

Commit 842fd89

Browse files
committed
address comments
1 parent 5eb94c6 commit 842fd89

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

llvm/include/llvm/Analysis/ValueTracking.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -781,7 +781,7 @@ LLVM_ABI bool impliesPoison(const Value *ValAssumedPoison, const Value *V);
781781
/// values (possibly dropping poison flags along the way) until we reach the
782782
/// phi again. In that case, we can move the freeze to the start value.
783783
LLVM_ABI Use *canFoldFreezeIntoRecurrence(
784-
PHINode *PN, DominatorTree *DT, bool &StartNeedsFreeze,
784+
PHINode *PN, const DominatorTree *DT, bool &StartNeedsFreeze,
785785
SmallVectorImpl<Instruction *> *DropFlags = nullptr, unsigned Depth = 0);
786786

787787
/// Return true if this function can prove that V does not have undef bits

llvm/lib/Analysis/ValueTracking.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7570,7 +7570,7 @@ bool llvm::impliesPoison(const Value *ValAssumedPoison, const Value *V) {
75707570
static bool programUndefinedIfUndefOrPoison(const Value *V, bool PoisonOnly);
75717571

75727572
Use *llvm::canFoldFreezeIntoRecurrence(
7573-
PHINode *PN, DominatorTree *DT, bool &StartNeedsFreeze,
7573+
PHINode *PN, const DominatorTree *DT, bool &StartNeedsFreeze,
75747574
SmallVectorImpl<Instruction *> *DropFlags, unsigned Depth) {
75757575
// Detect whether this is a recurrence with a start value and some number of
75767576
// backedge values. We'll check whether we can push the freeze through the
@@ -7722,9 +7722,9 @@ static bool isGuaranteedNotToBeUndefOrPoison(
77227722
return true;
77237723

77247724
bool StartNeedsFreeze;
7725-
if (canFoldFreezeIntoRecurrence(
7726-
const_cast<PHINode *>(PN), const_cast<DominatorTree *>(DT),
7727-
StartNeedsFreeze, /*DropFlags=*/nullptr, Depth) &&
7725+
if (canFoldFreezeIntoRecurrence(const_cast<PHINode *>(PN), DT,
7726+
StartNeedsFreeze, /*DropFlags=*/nullptr,
7727+
Depth) &&
77287728
!StartNeedsFreeze)
77297729
return true;
77307730
} else if (!::canCreateUndefOrPoison(Opr, Kind,

0 commit comments

Comments
 (0)