[llvm] 0bc2f55 - [InstCombine] Modernize InstCombineOptions (NFC)
Kazu Hirata via llvm-commits
llvm-commits at lists.llvm.org
Sun Apr 16 12:43:13 PDT 2023
Author: Kazu Hirata
Date: 2023-04-16T12:43:02-07:00
New Revision: 0bc2f553bc129b43503de1cdcc9d24c7016c1298
URL: https://github.com/llvm/llvm-project/commit/0bc2f553bc129b43503de1cdcc9d24c7016c1298
DIFF: https://github.com/llvm/llvm-project/commit/0bc2f553bc129b43503de1cdcc9d24c7016c1298.diff
LOG: [InstCombine] Modernize InstCombineOptions (NFC)
Identified with modernize-use-default-member-init.
Added:
Modified:
llvm/include/llvm/Transforms/InstCombine/InstCombine.h
Removed:
################################################################################
diff --git a/llvm/include/llvm/Transforms/InstCombine/InstCombine.h b/llvm/include/llvm/Transforms/InstCombine/InstCombine.h
index 9c6bcc661d93..557d0a4c30d6 100644
--- a/llvm/include/llvm/Transforms/InstCombine/InstCombine.h
+++ b/llvm/include/llvm/Transforms/InstCombine/InstCombine.h
@@ -28,11 +28,10 @@ namespace llvm {
static constexpr unsigned InstCombineDefaultMaxIterations = 1000;
struct InstCombineOptions {
- bool UseLoopInfo;
- unsigned MaxIterations;
+ bool UseLoopInfo = false;
+ unsigned MaxIterations = InstCombineDefaultMaxIterations;
- InstCombineOptions()
- : UseLoopInfo(false), MaxIterations(InstCombineDefaultMaxIterations) {}
+ InstCombineOptions() = default;
InstCombineOptions &setUseLoopInfo(bool Value) {
UseLoopInfo = Value;
More information about the llvm-commits
mailing list