Skip to content

Commit 2f3bc37

Browse files
authored
[PredicateInfo] Update comments for PredicateAssume (NFC) (#139269)
Previously, PredicateAssume was modified to materialize after the assume statement rather than before it (See 353fa44). Update relevant comments to match this.
1 parent 7ff0cf6 commit 2f3bc37

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

llvm/lib/Transforms/Utils/PredicateInfo.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -546,10 +546,10 @@ Value *PredicateInfoBuilder::materializeStack(unsigned int &Counter,
546546
? OrigOp
547547
: (RenameStack.end() - Start - 1)->Def;
548548
// For edge predicates, we can just place the operand in the block before
549-
// the terminator. For assume, we have to place it right before the assume
550-
// to ensure we dominate all of our uses. Always insert right before the
551-
// relevant instruction (terminator, assume), so that we insert in proper
552-
// order in the case of multiple predicateinfo in the same block.
549+
// the terminator. For assume, we have to place it right after the assume
550+
// to ensure we dominate all uses except assume itself. Always insert
551+
// right before the terminator or after the assume, so that we insert in
552+
// proper order in the case of multiple predicateinfo in the same block.
553553
// The number of named values is used to detect if a new declaration was
554554
// added. If so, that declaration is tracked so that it can be removed when
555555
// the analysis is done. The corner case were a new declaration results in
@@ -622,7 +622,7 @@ void PredicateInfoBuilder::renameUses(SmallVectorImpl<Value *> &OpsToRename) {
622622
// The predicate info for branches always come first, they will get
623623
// materialized in the split block at the top of the block.
624624
// The predicate info for assumes will be somewhere in the middle,
625-
// it will get materialized in front of the assume.
625+
// it will get materialized right after the assume.
626626
if (const auto *PAssume = dyn_cast<PredicateAssume>(PossibleCopy)) {
627627
VD.LocalNum = LN_Middle;
628628
DomTreeNode *DomNode = DT.getNode(PAssume->AssumeInst->getParent());

0 commit comments

Comments
 (0)