[flang-commits] [flang] [mlir] [mlir] Do not merge blocks during canonicalization by default (PR #95057)
via flang-commits
flang-commits at lists.llvm.org
Wed Jun 12 05:03:47 PDT 2024
github-actions[bot] wrote:
<!--LLVM CODE FORMAT COMMENT: {clang-format}-->
:warning: C/C++ code formatter, clang-format found issues in your code. :warning:
<details>
<summary>
You can test this locally with the following command:
</summary>
``````````bash
git-clang-format --diff 1fe4f2d1a4b9d16ae41076608783df4427a4d985 02df4d111ee7f9c6cdc4cddbf09744df5b51afd2 -- flang/include/flang/Tools/CLOptions.inc flang/lib/Optimizer/HLFIR/Transforms/InlineElementals.cpp flang/lib/Optimizer/HLFIR/Transforms/LowerHLFIRIntrinsics.cpp flang/lib/Optimizer/HLFIR/Transforms/OptimizedBufferization.cpp flang/lib/Optimizer/Transforms/AssumedRankOpConversion.cpp flang/lib/Optimizer/Transforms/StackArrays.cpp mlir/include/mlir/Transforms/GreedyPatternRewriteDriver.h mlir/include/mlir/Transforms/Passes.h mlir/include/mlir/Transforms/RegionUtils.h mlir/lib/Transforms/Utils/GreedyPatternRewriteDriver.cpp mlir/lib/Transforms/Utils/RegionUtils.cpp
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/flang/lib/Optimizer/HLFIR/Transforms/InlineElementals.cpp b/flang/lib/Optimizer/HLFIR/Transforms/InlineElementals.cpp
index eb4ddbdf9a..4b0b8594c3 100644
--- a/flang/lib/Optimizer/HLFIR/Transforms/InlineElementals.cpp
+++ b/flang/lib/Optimizer/HLFIR/Transforms/InlineElementals.cpp
@@ -119,7 +119,8 @@ public:
mlir::GreedyRewriteConfig config;
// Prevent the pattern driver from merging blocks.
- config.enableRegionSimplification = mlir::GreedySimplifyRegionLevel::Disabled;
+ config.enableRegionSimplification =
+ mlir::GreedySimplifyRegionLevel::Disabled;
mlir::RewritePatternSet patterns(context);
patterns.insert<InlineElementalConversion>(context);
diff --git a/flang/lib/Optimizer/HLFIR/Transforms/LowerHLFIRIntrinsics.cpp b/flang/lib/Optimizer/HLFIR/Transforms/LowerHLFIRIntrinsics.cpp
index f1d8418365..0347bec3a9 100644
--- a/flang/lib/Optimizer/HLFIR/Transforms/LowerHLFIRIntrinsics.cpp
+++ b/flang/lib/Optimizer/HLFIR/Transforms/LowerHLFIRIntrinsics.cpp
@@ -486,7 +486,8 @@ public:
// Pattern rewriting only requires that the resulting IR is still valid
mlir::GreedyRewriteConfig config;
// Prevent the pattern driver from merging blocks
- config.enableRegionSimplification = mlir::GreedySimplifyRegionLevel::Disabled;
+ config.enableRegionSimplification =
+ mlir::GreedySimplifyRegionLevel::Disabled;
if (mlir::failed(mlir::applyPatternsAndFoldGreedily(
module, std::move(patterns), config))) {
diff --git a/flang/lib/Optimizer/HLFIR/Transforms/OptimizedBufferization.cpp b/flang/lib/Optimizer/HLFIR/Transforms/OptimizedBufferization.cpp
index 90847cdfec..1dfa2f9d09 100644
--- a/flang/lib/Optimizer/HLFIR/Transforms/OptimizedBufferization.cpp
+++ b/flang/lib/Optimizer/HLFIR/Transforms/OptimizedBufferization.cpp
@@ -1042,7 +1042,8 @@ public:
mlir::GreedyRewriteConfig config;
// Prevent the pattern driver from merging blocks
- config.enableRegionSimplification = mlir::GreedySimplifyRegionLevel::Disabled;
+ config.enableRegionSimplification =
+ mlir::GreedySimplifyRegionLevel::Disabled;
mlir::RewritePatternSet patterns(context);
// TODO: right now the patterns are non-conflicting,
diff --git a/flang/lib/Optimizer/Transforms/AssumedRankOpConversion.cpp b/flang/lib/Optimizer/Transforms/AssumedRankOpConversion.cpp
index 8c1892a57f..2912f04304 100644
--- a/flang/lib/Optimizer/Transforms/AssumedRankOpConversion.cpp
+++ b/flang/lib/Optimizer/Transforms/AssumedRankOpConversion.cpp
@@ -150,7 +150,8 @@ public:
patterns.insert<ReboxAssumedRankConv>(context, &symbolTable, kindMap);
patterns.insert<IsAssumedSizeConv>(context, &symbolTable, kindMap);
mlir::GreedyRewriteConfig config;
- config.enableRegionSimplification = mlir::GreedySimplifyRegionLevel::Disabled;
+ config.enableRegionSimplification =
+ mlir::GreedySimplifyRegionLevel::Disabled;
(void)applyPatternsAndFoldGreedily(mod, std::move(patterns), config);
}
};
``````````
</details>
https://github.com/llvm/llvm-project/pull/95057
More information about the flang-commits
mailing list