Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[flang][NFC] Removed unneeded engineering option. #122305

Merged
merged 1 commit into from
Jan 10, 2025

Conversation

vzakhari
Copy link
Contributor

@vzakhari vzakhari commented Jan 9, 2025

No description provided.

@vzakhari vzakhari requested a review from jeanPerier January 9, 2025 15:48
@llvmbot llvmbot added flang Flang issues not falling into any other category flang:fir-hlfir labels Jan 9, 2025
@llvmbot
Copy link
Member

llvmbot commented Jan 9, 2025

@llvm/pr-subscribers-flang-fir-hlfir

Author: Slava Zakharin (vzakhari)

Changes

Full diff: https://github.com/llvm/llvm-project/pull/122305.diff

2 Files Affected:

  • (modified) flang/lib/Optimizer/HLFIR/Transforms/SimplifyHLFIRIntrinsics.cpp (-8)
  • (modified) flang/test/HLFIR/simplify-hlfir-intrinsics-sum.fir (+1-1)
diff --git a/flang/lib/Optimizer/HLFIR/Transforms/SimplifyHLFIRIntrinsics.cpp b/flang/lib/Optimizer/HLFIR/Transforms/SimplifyHLFIRIntrinsics.cpp
index bf3d261e7e8833..314ced8679521a 100644
--- a/flang/lib/Optimizer/HLFIR/Transforms/SimplifyHLFIRIntrinsics.cpp
+++ b/flang/lib/Optimizer/HLFIR/Transforms/SimplifyHLFIRIntrinsics.cpp
@@ -28,11 +28,6 @@ namespace hlfir {
 #include "flang/Optimizer/HLFIR/Passes.h.inc"
 } // namespace hlfir
 
-static llvm::cl::opt<bool>
-    simplifySum("flang-simplify-hlfir-sum",
-                llvm::cl::desc("Expand hlfir.sum into an inline sequence"),
-                llvm::cl::init(true));
-
 namespace {
 
 class TransposeAsElementalConversion
@@ -109,9 +104,6 @@ class SumAsElementalConversion : public mlir::OpRewritePattern<hlfir::SumOp> {
   llvm::LogicalResult
   matchAndRewrite(hlfir::SumOp sum,
                   mlir::PatternRewriter &rewriter) const override {
-    if (!simplifySum)
-      return rewriter.notifyMatchFailure(sum, "SUM simplification is disabled");
-
     hlfir::Entity array = hlfir::Entity{sum.getArray()};
     bool isTotalReduction = hlfir::Entity{sum}.getRank() == 0;
     mlir::Value dim = sum.getDim();
diff --git a/flang/test/HLFIR/simplify-hlfir-intrinsics-sum.fir b/flang/test/HLFIR/simplify-hlfir-intrinsics-sum.fir
index 58a2144947b148..d1915952d77eae 100644
--- a/flang/test/HLFIR/simplify-hlfir-intrinsics-sum.fir
+++ b/flang/test/HLFIR/simplify-hlfir-intrinsics-sum.fir
@@ -1,4 +1,4 @@
-// RUN: fir-opt --simplify-hlfir-intrinsics -flang-simplify-hlfir-sum %s | FileCheck %s
+// RUN: fir-opt --simplify-hlfir-intrinsics %s | FileCheck %s
 
 // box with known extents
 func.func @sum_box_known_extents(%arg0: !fir.box<!fir.array<2x3xi32>>) -> !hlfir.expr<2xi32> {

Copy link
Contributor

@jeanPerier jeanPerier left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks

@vzakhari vzakhari merged commit beba4b0 into llvm:main Jan 10, 2025
11 checks passed
BaiXilin pushed a commit to BaiXilin/llvm-fix-vnni-instr-types that referenced this pull request Jan 12, 2025
Mel-Chen pushed a commit to Mel-Chen/llvm-project that referenced this pull request Jan 13, 2025
DKLoehr pushed a commit to DKLoehr/llvm-project that referenced this pull request Jan 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
flang:fir-hlfir flang Flang issues not falling into any other category
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants