[llvm] [LVI][ValueTracking] Take UB-implying attributes into account in `isSafeToSpeculativelyExecute` (PR #137604)
Nikita Popov via llvm-commits
llvm-commits at lists.llvm.org
Mon Apr 28 07:20:04 PDT 2025
================
@@ -539,31 +539,43 @@ bool isNotCrossLaneOperation(const Instruction *I);
/// move the instruction as long as the correct dominance relationships for
/// the operands and users hold.
///
+/// If \p UseVariableInfo is true, the information from non-constant operands
+/// will be taken into account.
+///
+/// If \p AllowRefinement is true, UB-implying attributes and metadata will be
+/// ignored. The caller is responsible for correctly propagating them after
+/// hoisting.
----------------
nikic wrote:
I don't think AllowRefinement is really the right flag name for this. E.g. refinement to poison is fine.
I'd give this a more explicit name like IgnoreUBImplifyAttrs.
https://github.com/llvm/llvm-project/pull/137604
More information about the llvm-commits
mailing list