[flang-commits] [flang] [flang][acc] Implement cache directive lowering (PR #174897)
via flang-commits
flang-commits at lists.llvm.org
Thu Jan 8 09:23:35 PST 2026
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 origin/main HEAD --extensions h,cpp -- flang/include/flang/Optimizer/OpenACC/Support/FIROpenACCOpsInterfaces.h flang/lib/Lower/Bridge.cpp flang/lib/Lower/OpenACC.cpp flang/lib/Optimizer/OpenACC/Support/RegisterOpenACCExtensions.cpp --diff_from_common_commit
``````````
:warning:
The reproduction instructions above might return results for more than one PR
in a stack if you are using a stacked PR workflow. You can limit the results by
changing `origin/main` to the base branch/commit you want to compare against.
:warning:
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/flang/lib/Lower/OpenACC.cpp b/flang/lib/Lower/OpenACC.cpp
index 52cd1c34f..09bea1f35 100644
--- a/flang/lib/Lower/OpenACC.cpp
+++ b/flang/lib/Lower/OpenACC.cpp
@@ -5008,8 +5008,8 @@ genACC(Fortran::lower::AbstractConverter &converter,
// Use acc.cache directly as the variable definition.
converter.getSymbolMap().addVariableDefinition(
- symbol, mlir::cast<fir::FortranVariableOpInterface>(
- cacheOp.getOperation()));
+ symbol,
+ mlir::cast<fir::FortranVariableOpInterface>(cacheOp.getOperation()));
}
}
diff --git a/flang/lib/Optimizer/OpenACC/Support/RegisterOpenACCExtensions.cpp b/flang/lib/Optimizer/OpenACC/Support/RegisterOpenACCExtensions.cpp
index 30aa64f0b..6489ef302 100644
--- a/flang/lib/Optimizer/OpenACC/Support/RegisterOpenACCExtensions.cpp
+++ b/flang/lib/Optimizer/OpenACC/Support/RegisterOpenACCExtensions.cpp
@@ -84,7 +84,6 @@ void registerOpenACCExtensions(mlir::DialectRegistry ®istry) {
PartialEntityAccessModel<hlfir::DeclareOp>>(*ctx);
});
-
// Register FortranVariableOpInterface for OpenACC cache operation
registry.addExtension(
+[](mlir::MLIRContext *ctx, mlir::acc::OpenACCDialect *dialect) {
``````````
</details>
https://github.com/llvm/llvm-project/pull/174897
More information about the flang-commits
mailing list