[llvm] 1b722f0 - [DomTree] Add docstring for `dominates(const Instruction*, const BasicBlock*)`. NFC
Michael Maitland via llvm-commits
llvm-commits at lists.llvm.org
Thu Dec 1 15:20:39 PST 2022
Author: Michael Maitland
Date: 2022-12-01T15:18:10-08:00
New Revision: 1b722f04306afe1023952d1b59bd7d9d4d5ffc7a
URL: https://github.com/llvm/llvm-project/commit/1b722f04306afe1023952d1b59bd7d9d4d5ffc7a
DIFF: https://github.com/llvm/llvm-project/commit/1b722f04306afe1023952d1b59bd7d9d4d5ffc7a.diff
LOG: [DomTree] Add docstring for `dominates(const Instruction*, const BasicBlock*)`. NFC
Differential Revision: https://reviews.llvm.org/D139150
Added:
Modified:
llvm/include/llvm/IR/Dominators.h
Removed:
################################################################################
diff --git a/llvm/include/llvm/IR/Dominators.h b/llvm/include/llvm/IR/Dominators.h
index a381c075d77b..7fbc7608dea4 100644
--- a/llvm/include/llvm/IR/Dominators.h
+++ b/llvm/include/llvm/IR/Dominators.h
@@ -196,8 +196,12 @@ class DominatorTree : public DominatorTreeBase<BasicBlock, false> {
/// Return true if value Def dominates all possible uses inside instruction
/// User. Same comments as for the Use-based API apply.
bool dominates(const Value *Def, const Instruction *User) const;
- // Does not accept Value to avoid ambiguity with dominance checks between
- // two basic blocks.
+
+ /// Returns true if Def would dominate a use in any instruction in BB.
+ /// If Def is an instruction in BB, then Def does not dominate BB.
+ ///
+ /// Does not accept Value to avoid ambiguity with dominance checks between
+ /// two basic blocks.
bool dominates(const Instruction *Def, const BasicBlock *BB) const;
/// Return true if an edge dominates a use.
More information about the llvm-commits
mailing list