Skip to content

Commit

Permalink
[flang][NFC] Removed unneeded engineering option. (#122305)
Browse files Browse the repository at this point in the history
  • Loading branch information
vzakhari authored Jan 10, 2025
1 parent 0afee85 commit beba4b0
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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();
Expand Down
2 changes: 1 addition & 1 deletion flang/test/HLFIR/simplify-hlfir-intrinsics-sum.fir
Original file line number Diff line number Diff line change
@@ -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> {
Expand Down

0 comments on commit beba4b0

Please sign in to comment.