[llvm] [Local] Move OverflowTracking to Local.h, move logic to helpers (NFC) (PR #140403)
Yingwei Zheng via llvm-commits
llvm-commits at lists.llvm.org
Sun May 18 01:31:56 PDT 2025
================
@@ -556,6 +556,27 @@ Value *invertCondition(Value *Condition);
/// function, explicitly materialize the maximal set in the IR.
bool inferAttributesFromOthers(Function &F);
+//===----------------------------------------------------------------------===//
+// Helpers to track and update flags on instructions.
+//
+
+struct OverflowTracking {
+ bool HasNUW = true;
+ bool HasNSW = true;
+ bool AllKnownNonNegative = true;
----------------
dtcxzyw wrote:
Please add a comment indicating that the user is responsible for updating `AllKnownNonNegative` and `AllKnownNonZero`.
https://github.com/llvm/llvm-project/pull/140403
More information about the llvm-commits
mailing list