diff options
author | GnSight <ftyg@live.com> | 2025-05-25 04:22:43 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-05-24 22:22:43 +0200 |
commit | 2f3bc37cd20bace8ca5aff681369676bff9b1bca (patch) | |
tree | 2da1651979165bdc3cda6e2c6cd7ddc2cd5611c0 /llvm/lib/Transforms/Utils/PredicateInfo.cpp | |
parent | 7ff0cf6138f30db4f361a20eda7d18692337d351 (diff) | |
download | llvm-2f3bc37cd20bace8ca5aff681369676bff9b1bca.zip llvm-2f3bc37cd20bace8ca5aff681369676bff9b1bca.tar.gz llvm-2f3bc37cd20bace8ca5aff681369676bff9b1bca.tar.bz2 |
[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.
Diffstat (limited to 'llvm/lib/Transforms/Utils/PredicateInfo.cpp')
-rw-r--r-- | llvm/lib/Transforms/Utils/PredicateInfo.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/llvm/lib/Transforms/Utils/PredicateInfo.cpp b/llvm/lib/Transforms/Utils/PredicateInfo.cpp index 9ae10b0..d4b2bcf 100644 --- a/llvm/lib/Transforms/Utils/PredicateInfo.cpp +++ b/llvm/lib/Transforms/Utils/PredicateInfo.cpp @@ -546,10 +546,10 @@ Value *PredicateInfoBuilder::materializeStack(unsigned int &Counter, ? OrigOp : (RenameStack.end() - Start - 1)->Def; // For edge predicates, we can just place the operand in the block before - // the terminator. For assume, we have to place it right before the assume - // to ensure we dominate all of our uses. Always insert right before the - // relevant instruction (terminator, assume), so that we insert in proper - // order in the case of multiple predicateinfo in the same block. + // the terminator. For assume, we have to place it right after the assume + // to ensure we dominate all uses except assume itself. Always insert + // right before the terminator or after the assume, so that we insert in + // proper order in the case of multiple predicateinfo in the same block. // The number of named values is used to detect if a new declaration was // added. If so, that declaration is tracked so that it can be removed when // the analysis is done. The corner case were a new declaration results in @@ -622,7 +622,7 @@ void PredicateInfoBuilder::renameUses(SmallVectorImpl<Value *> &OpsToRename) { // The predicate info for branches always come first, they will get // materialized in the split block at the top of the block. // The predicate info for assumes will be somewhere in the middle, - // it will get materialized in front of the assume. + // it will get materialized right after the assume. if (const auto *PAssume = dyn_cast<PredicateAssume>(PossibleCopy)) { VD.LocalNum = LN_Middle; DomTreeNode *DomNode = DT.getNode(PAssume->AssumeInst->getParent()); |