[flang-commits] [flang] [flang][openacc][NFC] remove useAccReductionCombine cl switch (PR #208756)

via flang-commits flang-commits at lists.llvm.org
Fri Jul 10 08:27:53 PDT 2026


https://github.com/jeanPerier created https://github.com/llvm/llvm-project/pull/208756

Follow-up of https://github.com/llvm/llvm-project/pull/208473 to remove the switch altogether to simplify the compiler code.

>From 8974858b50d8ecb702e8368f2054fa61ca743b8a Mon Sep 17 00:00:00 2001
From: Jean Perier <jperier at nvidia.com>
Date: Fri, 10 Jul 2026 08:25:24 -0700
Subject: [PATCH] [flang][openacc][NFC] remove useAccReductionCombine switch

---
 .../OpenACC/Support/FIROpenACCTypeInterfaces.cpp          | 8 --------
 1 file changed, 8 deletions(-)

diff --git a/flang/lib/Optimizer/OpenACC/Support/FIROpenACCTypeInterfaces.cpp b/flang/lib/Optimizer/OpenACC/Support/FIROpenACCTypeInterfaces.cpp
index e0f0450ec119c..4c4d9d3879fef 100644
--- a/flang/lib/Optimizer/OpenACC/Support/FIROpenACCTypeInterfaces.cpp
+++ b/flang/lib/Optimizer/OpenACC/Support/FIROpenACCTypeInterfaces.cpp
@@ -35,12 +35,6 @@
 #include "llvm/ADT/TypeSwitch.h"
 #include "llvm/Support/CommandLine.h"
 
-static llvm::cl::opt<bool> useAccReductionCombine(
-    "openacc-use-reduction-combine",
-    llvm::cl::desc("Whether to generate acc.reduction_combine. Does not "
-                   "control reduction for MIN/MAX and logical reductions."),
-    llvm::cl::init(true));
-
 static llvm::cl::opt<bool> useAccReductionCombineAll(
     "openacc-use-reduction-combine-all",
     llvm::cl::desc("Whether to generate acc.reduction_combine for all types "
@@ -1160,8 +1154,6 @@ static bool useAccReductionCombineOp(mlir::Type elementType,
                                      mlir::acc::ReductionOperator op) {
   if (useAccReductionCombineAll)
     return true;
-  if (!useAccReductionCombine)
-    return false;
   // LOGICAL operators do not have mlir operators and requires FIR specific
   // logic to interpret the TRUE and FALSE values from the storage (implemented
   // in fir.convert to i1).



More information about the flang-commits mailing list