[llvm] [ValueTracking][NFC] Early exit when enumerating guaranteed well-defined/non-poison operands. (PR #82812)
Nikita Popov via llvm-commits
llvm-commits at lists.llvm.org
Sun Feb 25 08:39:54 PST 2024
================
@@ -7211,84 +7211,108 @@ bool llvm::propagatesPoison(const Use &PoisonOp) {
}
}
-void llvm::getGuaranteedWellDefinedOps(
- const Instruction *I, SmallVectorImpl<const Value *> &Operands) {
+/// Enumerates all operands of \p I that are guaranteed to not be undef or
+/// poison. If the callback \p Handle returns true, stop processing and return
+/// true. Otherwise, return false.
+template <typename CallableT>
+bool handleGuaranteedWellDefinedOps(const Instruction *I,
----------------
nikic wrote:
```suggestion
static bool handleGuaranteedWellDefinedOps(const Instruction *I,
```
https://github.com/llvm/llvm-project/pull/82812
More information about the llvm-commits
mailing list