[flang-commits] [flang] [flang] Enable hlfir.sum inlining by default. (PR #119937)

Slava Zakharin via flang-commits flang-commits at lists.llvm.org
Fri Dec 13 15:51:07 PST 2024


https://github.com/vzakhari created https://github.com/llvm/llvm-project/pull/119937

There is already a LIT test for hlfir.sum inlining that uses
the engineering option. I would like to keep the option
for short period of time to be able to revert
in case of performance regressions that I was not able to see.


>From 620877a7c7886c0717206ce54a72eaaa3c3853dc Mon Sep 17 00:00:00 2001
From: Slava Zakharin <szakharin at nvidia.com>
Date: Fri, 13 Dec 2024 15:47:30 -0800
Subject: [PATCH] [flang] Enable hlfir.sum inlining by default.

There is already a LIT test for hlfir.sum inlining that uses
the engineering option. I would like to keep the option
for short period of time to be able to revert
in case of performance regressions that I was not able to see.
---
 .../lib/Optimizer/HLFIR/Transforms/SimplifyHLFIRIntrinsics.cpp | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/flang/lib/Optimizer/HLFIR/Transforms/SimplifyHLFIRIntrinsics.cpp b/flang/lib/Optimizer/HLFIR/Transforms/SimplifyHLFIRIntrinsics.cpp
index 3e9d956b6e56dd..a90c5a9ef5a4e5 100644
--- a/flang/lib/Optimizer/HLFIR/Transforms/SimplifyHLFIRIntrinsics.cpp
+++ b/flang/lib/Optimizer/HLFIR/Transforms/SimplifyHLFIRIntrinsics.cpp
@@ -33,7 +33,8 @@ 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(false));
+                llvm::cl::init(true));
+
 namespace {
 
 class TransposeAsElementalConversion



More information about the flang-commits mailing list