[llvm] 2cae13d - [DominanceFrontierBase] Fix doc of compare()'s return value. (#81352)
via llvm-commits
llvm-commits at lists.llvm.org
Tue Mar 12 07:46:23 PDT 2024
Author: bvlgah
Date: 2024-03-12T14:46:18Z
New Revision: 2cae13d60590c999c37828d709ff4ba58e5f261b
URL: https://github.com/llvm/llvm-project/commit/2cae13d60590c999c37828d709ff4ba58e5f261b
DIFF: https://github.com/llvm/llvm-project/commit/2cae13d60590c999c37828d709ff4ba58e5f261b.diff
LOG: [DominanceFrontierBase] Fix doc of compare()'s return value. (#81352)
This is a trivial fix ( I guess it has not been noticed because of no
use). Currently, the doc says the function returns `true` if two
instances of `DominanceFrontierBase` matches, otherwise `false` is
returned. I have checked the implementation
https://github.com/llvm/llvm-project/blob/9308d6688c673606fee1625d777a52539ae72015/llvm/include/llvm/Analysis/DominanceFrontierImpl.h#L71-L94
which examines whether two dominance frontier mappings are equal, and
the actual value it returns contradicts the description in the doc.
Added:
Modified:
llvm/include/llvm/Analysis/DominanceFrontier.h
Removed:
################################################################################
diff --git a/llvm/include/llvm/Analysis/DominanceFrontier.h b/llvm/include/llvm/Analysis/DominanceFrontier.h
index b65cdc9cdb3c4f..772fdc9ddee02a 100644
--- a/llvm/include/llvm/Analysis/DominanceFrontier.h
+++ b/llvm/include/llvm/Analysis/DominanceFrontier.h
@@ -101,8 +101,8 @@ class DominanceFrontierBase {
/// return true;
bool compareDomSet(DomSetType &DS1, const DomSetType &DS2) const;
- /// compare - Return true if the other dominance frontier base matches
- /// this dominance frontier base. Otherwise return false.
+ /// compare - Return false if the other dominance frontier base matches
+ /// this dominance frontier base. Otherwise return true.
bool compare(DominanceFrontierBase &Other) const;
/// print - Convert to human readable form
More information about the llvm-commits
mailing list