[llvm] Fix the doc about the returned value of DominanceFrontierBase::compare (PR #81352)
via llvm-commits
llvm-commits at lists.llvm.org
Sat Feb 10 01:24:55 PST 2024
https://github.com/bvlgah created https://github.com/llvm/llvm-project/pull/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.
>From 2ea12693f0b5add9cb31d4512c249b3d6abf676d Mon Sep 17 00:00:00 2001
From: bvlgah <11882867+bvlgah at users.noreply.github.com>
Date: Sat, 10 Feb 2024 16:40:33 +0800
Subject: [PATCH] Fix the doc about the returned value of
DominanceFrontierBase::compare
---
llvm/include/llvm/Analysis/DominanceFrontier.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
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