[flang-commits] [flang] [Flang][OpenMP] NFC: Flang OpenMP passes cleanup (PR #107386)
via flang-commits
flang-commits at lists.llvm.org
Thu Sep 5 04:45:16 PDT 2024
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-flang-fir-hlfir
Author: Sergio Afonso (skatrak)
<details>
<summary>Changes</summary>
For consistency, this patch renames the `FunctionFiltering` pass to `FunctionFilteringPass`. Also, OpenMP pass-related `#define`s are removed from flang/Optimizer/Transforms/Passes.h, since `#define`s don't have an effect there after moving related passes to flang/Optimizer/OpenMP/Passes.td.
---
Full diff: https://github.com/llvm/llvm-project/pull/107386.diff
4 Files Affected:
- (modified) flang/include/flang/Optimizer/OpenMP/Passes.td (+1-1)
- (modified) flang/include/flang/Optimizer/Transforms/Passes.h (-3)
- (modified) flang/include/flang/Tools/CLOptions.inc (+1-1)
- (modified) flang/lib/Optimizer/OpenMP/FunctionFiltering.cpp (+2-2)
``````````diff
diff --git a/flang/include/flang/Optimizer/OpenMP/Passes.td b/flang/include/flang/Optimizer/OpenMP/Passes.td
index a5f98e1320c940..1c0ce08f5b4838 100644
--- a/flang/include/flang/Optimizer/OpenMP/Passes.td
+++ b/flang/include/flang/Optimizer/OpenMP/Passes.td
@@ -28,7 +28,7 @@ def MarkDeclareTargetPass
let dependentDialects = ["mlir::omp::OpenMPDialect"];
}
-def FunctionFiltering : Pass<"omp-function-filtering"> {
+def FunctionFilteringPass : Pass<"omp-function-filtering"> {
let summary = "Filters out functions intended for the host when compiling "
"for the target device.";
let dependentDialects = [
diff --git a/flang/include/flang/Optimizer/Transforms/Passes.h b/flang/include/flang/Optimizer/Transforms/Passes.h
index 6f98e3a25ec125..59266a6adfe464 100644
--- a/flang/include/flang/Optimizer/Transforms/Passes.h
+++ b/flang/include/flang/Optimizer/Transforms/Passes.h
@@ -53,9 +53,6 @@ namespace fir {
#define GEN_PASS_DECL_STACKRECLAIM
#define GEN_PASS_DECL_LOOPVERSIONING
#define GEN_PASS_DECL_ADDALIASTAGS
-#define GEN_PASS_DECL_OMPMAPINFOFINALIZATIONPASS
-#define GEN_PASS_DECL_OMPMARKDECLARETARGETPASS
-#define GEN_PASS_DECL_OMPFUNCTIONFILTERING
#define GEN_PASS_DECL_VSCALEATTR
#define GEN_PASS_DECL_FUNCTIONATTR
#define GEN_PASS_DECL_CONSTANTARGUMENTGLOBALISATIONOPT
diff --git a/flang/include/flang/Tools/CLOptions.inc b/flang/include/flang/Tools/CLOptions.inc
index 20351dcf6d6f82..04b7f0ba370b86 100644
--- a/flang/include/flang/Tools/CLOptions.inc
+++ b/flang/include/flang/Tools/CLOptions.inc
@@ -370,7 +370,7 @@ inline void createOpenMPFIRPassPipeline(
pm.addPass(flangomp::createMapInfoFinalizationPass());
pm.addPass(flangomp::createMarkDeclareTargetPass());
if (isTargetDevice)
- pm.addPass(flangomp::createFunctionFiltering());
+ pm.addPass(flangomp::createFunctionFilteringPass());
}
#if !defined(FLANG_EXCLUDE_CODEGEN)
diff --git a/flang/lib/Optimizer/OpenMP/FunctionFiltering.cpp b/flang/lib/Optimizer/OpenMP/FunctionFiltering.cpp
index bd9005d3e2df6f..9554808824ac30 100644
--- a/flang/lib/Optimizer/OpenMP/FunctionFiltering.cpp
+++ b/flang/lib/Optimizer/OpenMP/FunctionFiltering.cpp
@@ -22,7 +22,7 @@
#include "llvm/ADT/SmallVector.h"
namespace flangomp {
-#define GEN_PASS_DEF_FUNCTIONFILTERING
+#define GEN_PASS_DEF_FUNCTIONFILTERINGPASS
#include "flang/Optimizer/OpenMP/Passes.h.inc"
} // namespace flangomp
@@ -30,7 +30,7 @@ using namespace mlir;
namespace {
class FunctionFilteringPass
- : public flangomp::impl::FunctionFilteringBase<FunctionFilteringPass> {
+ : public flangomp::impl::FunctionFilteringPassBase<FunctionFilteringPass> {
public:
FunctionFilteringPass() = default;
``````````
</details>
https://github.com/llvm/llvm-project/pull/107386
More information about the flang-commits
mailing list