[llvm] b1f1329 - [Scalar] Use default member initialization in OverflowTracking (NFC) (#138412)
via llvm-commits
llvm-commits at lists.llvm.org
Sat May 3 17:40:06 PDT 2025
Author: Kazu Hirata
Date: 2025-05-03T17:40:03-07:00
New Revision: b1f13293d7672c5f84175d07c92b66142defaf1a
URL: https://github.com/llvm/llvm-project/commit/b1f13293d7672c5f84175d07c92b66142defaf1a
DIFF: https://github.com/llvm/llvm-project/commit/b1f13293d7672c5f84175d07c92b66142defaf1a.diff
LOG: [Scalar] Use default member initialization in OverflowTracking (NFC) (#138412)
Added:
Modified:
llvm/include/llvm/Transforms/Scalar/Reassociate.h
Removed:
################################################################################
diff --git a/llvm/include/llvm/Transforms/Scalar/Reassociate.h b/llvm/include/llvm/Transforms/Scalar/Reassociate.h
index 6d56961a71019..23b70164d96a4 100644
--- a/llvm/include/llvm/Transforms/Scalar/Reassociate.h
+++ b/llvm/include/llvm/Transforms/Scalar/Reassociate.h
@@ -65,16 +65,14 @@ struct Factor {
};
struct OverflowTracking {
- bool HasNUW;
- bool HasNSW;
- bool AllKnownNonNegative;
- bool AllKnownNonZero;
+ bool HasNUW = true;
+ bool HasNSW = true;
+ bool AllKnownNonNegative = true;
+ bool AllKnownNonZero = true;
// Note: AllKnownNonNegative can be true in a case where one of the operands
// is negative, but one the operators is not NSW. AllKnownNonNegative should
// not be used independently of HasNSW
- OverflowTracking()
- : HasNUW(true), HasNSW(true), AllKnownNonNegative(true),
- AllKnownNonZero(true) {}
+ OverflowTracking() = default;
};
class XorOpnd;
More information about the llvm-commits
mailing list