Skip to content

Commit f629587

Browse files
committed
Rename pass names
1 parent efda329 commit f629587

File tree

8 files changed

+26
-28
lines changed

8 files changed

+26
-28
lines changed

flang/docs/OpenMP-declare-target.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -149,15 +149,15 @@ flang/lib/Lower/OpenMP.cpp function `genDeclareTargetIntGlobal`.
149149

150150
There are currently two passes within Flang that are related to the processing
151151
of `declare target`:
152-
* `OMPMarkDeclareTarget` - This pass is in charge of marking functions captured
152+
* `MarkDeclareTarget` - This pass is in charge of marking functions captured
153153
(called from) in `target` regions or other `declare target` marked functions as
154154
`declare target`. It does so recursively, i.e. nested calls will also be
155155
implicitly marked. It currently will try to mark things as conservatively as
156156
possible, e.g. if captured in a `target` region it will apply `nohost`, unless
157157
it encounters a `host` `declare target` in which case it will apply the `any`
158158
device type. Functions are handled similarly, except we utilise the parent's
159159
device type where possible.
160-
* `OMPFunctionFiltering` - This is executed after the `OMPMarkDeclareTarget`
160+
* `FunctionFiltering` - This is executed after the `MarkDeclareTarget`
161161
pass, and its job is to conservatively remove host functions from
162162
the module where possible when compiling for the device. This helps make
163163
sure that most incompatible code for the host is not lowered for the

flang/docs/OpenMP-descriptor-management.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ Currently, Flang will lower these descriptor types in the OpenMP lowering (lower
4444
to all other map types, generating an omp.MapInfoOp containing relevant information required for lowering
4545
the OpenMP dialect to LLVM-IR during the final stages of the MLIR lowering. However, after
4646
the lowering to FIR/HLFIR has been performed an OpenMP dialect specific pass for Fortran,
47-
`OMPMapInfoFinalizationPass` (Optimizer/OMPMapInfoFinalization.cpp) will expand the
47+
`MapInfoFinalizationPass` (Optimizer/MapInfoFinalization.cpp) will expand the
4848
`omp.MapInfoOp`'s containing descriptors (which currently will be a `BoxType` or `BoxAddrOp`) into multiple
4949
mappings, with one extra per pointer member in the descriptor that is supported on top of the original
5050
descriptor map operation. These pointers members are linked to the parent descriptor by adding them to
@@ -53,7 +53,7 @@ owning operation's (`omp.TargetOp`, `omp.TargetDataOp` etc.) map operand list an
5353
operation is `IsolatedFromAbove`, it also inserts them as `BlockArgs` to canonicalize the mappings and
5454
simplify lowering.
5555
56-
An example transformation by the `OMPMapInfoFinalizationPass`:
56+
An example transformation by the `MapInfoFinalizationPass`:
5757
5858
```
5959

flang/include/flang/Optimizer/OpenMP/Passes.td

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111

1212
include "mlir/Pass/PassBase.td"
1313

14-
def OMPMapInfoFinalizationPass
14+
def MapInfoFinalizationPass
1515
: Pass<"omp-map-info-finalization"> {
1616
let summary = "expands OpenMP MapInfo operations containing descriptors";
1717
let description = [{
@@ -22,13 +22,13 @@ def OMPMapInfoFinalizationPass
2222
let dependentDialects = ["mlir::omp::OpenMPDialect"];
2323
}
2424

25-
def OMPMarkDeclareTargetPass
25+
def MarkDeclareTargetPass
2626
: Pass<"omp-mark-declare-target", "mlir::ModuleOp"> {
2727
let summary = "Marks all functions called by an OpenMP declare target function as declare target";
2828
let dependentDialects = ["mlir::omp::OpenMPDialect"];
2929
}
3030

31-
def OMPFunctionFiltering : Pass<"omp-function-filtering"> {
31+
def FunctionFiltering : Pass<"omp-function-filtering"> {
3232
let summary = "Filters out functions intended for the host when compiling "
3333
"for the target device.";
3434
let dependentDialects = [

flang/include/flang/Tools/CLOptions.inc

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@
1717
#include "mlir/Transforms/Passes.h"
1818
#include "flang/Optimizer/CodeGen/CodeGen.h"
1919
#include "flang/Optimizer/HLFIR/Passes.h"
20-
#include "flang/Optimizer/Transforms/Passes.h"
2120
#include "flang/Optimizer/OpenMP/Passes.h"
21+
#include "flang/Optimizer/Transforms/Passes.h"
2222
#include "llvm/Passes/OptimizationLevel.h"
2323
#include "llvm/Support/CommandLine.h"
2424
#include <type_traits>
@@ -359,10 +359,10 @@ inline void createHLFIRToFIRPassPipeline(
359359
inline void createOpenMPFIRPassPipeline(
360360
mlir::PassManager &pm, bool isTargetDevice) {
361361
addNestedPassToAllTopLevelOperations(
362-
pm, flangomp::createOMPMapInfoFinalizationPass);
363-
pm.addPass(flangomp::createOMPMarkDeclareTargetPass());
362+
pm, flangomp::createMapInfoFinalizationPass);
363+
pm.addPass(flangomp::createMarkDeclareTargetPass());
364364
if (isTargetDevice)
365-
pm.addPass(flangomp::createOMPFunctionFiltering());
365+
pm.addPass(flangomp::createFunctionFiltering());
366366
}
367367

368368
#if !defined(FLANG_EXCLUDE_CODEGEN)

flang/lib/Optimizer/OpenMP/CMakeLists.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
get_property(dialect_libs GLOBAL PROPERTY MLIR_DIALECT_LIBS)
22

33
add_flang_library(FlangOpenMPTransforms
4-
OMPFunctionFiltering.cpp
5-
OMPMapInfoFinalization.cpp
6-
OMPMarkDeclareTarget.cpp
4+
FunctionFiltering.cpp
5+
MapInfoFinalization.cpp
6+
MarkDeclareTarget.cpp
77

88
DEPENDS
99
FIRDialect

flang/lib/Optimizer/OpenMP/OMPFunctionFiltering.cpp renamed to flang/lib/Optimizer/OpenMP/FunctionFiltering.cpp

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//===- OMPFunctionFiltering.cpp -------------------------------------------===//
1+
//===- FunctionFiltering.cpp -------------------------------------------===//
22
//
33
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
44
// See https://llvm.org/LICENSE.txt for license information.
@@ -29,11 +29,10 @@ namespace flangomp {
2929
using namespace mlir;
3030

3131
namespace {
32-
class OMPFunctionFilteringPass
33-
: public flangomp::impl::OMPFunctionFilteringBase<
34-
OMPFunctionFilteringPass> {
32+
class FunctionFilteringPass
33+
: public flangomp::impl::FunctionFilteringBase<FunctionFilteringPass> {
3534
public:
36-
OMPFunctionFilteringPass() = default;
35+
FunctionFilteringPass() = default;
3736

3837
void runOnOperation() override {
3938
MLIRContext *context = &getContext();

flang/lib/Optimizer/OpenMP/OMPMapInfoFinalization.cpp renamed to flang/lib/Optimizer/OpenMP/MapInfoFinalization.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//===- OMPMapInfoFinalization.cpp -----------------------------------------===//
1+
//===- MapInfoFinalization.cpp -----------------------------------------===//
22
//
33
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
44
// See https://llvm.org/LICENSE.txt for license information.
@@ -46,9 +46,9 @@ namespace flangomp {
4646
} // namespace flangomp
4747

4848
namespace {
49-
class OMPMapInfoFinalizationPass
50-
: public flangomp::impl::OMPMapInfoFinalizationPassBase<
51-
OMPMapInfoFinalizationPass> {
49+
class MapInfoFinalizationPass
50+
: public flangomp::impl::MapInfoFinalizationPassBase<
51+
MapInfoFinalizationPass> {
5252

5353
void genDescriptorMemberMaps(mlir::omp::MapInfoOp op,
5454
fir::FirOpBuilder &builder,
@@ -244,7 +244,7 @@ class OMPMapInfoFinalizationPass
244244
// all users appropriately, making sure to only add a single member link
245245
// per new generation for the original originating descriptor MapInfoOp.
246246
assert(llvm::hasSingleElement(op->getUsers()) &&
247-
"OMPMapInfoFinalization currently only supports single users "
247+
"MapInfoFinalization currently only supports single users "
248248
"of a MapInfoOp");
249249

250250
if (!op.getMembers().empty()) {

flang/lib/Optimizer/OpenMP/OMPMarkDeclareTarget.cpp renamed to flang/lib/Optimizer/OpenMP/MarkDeclareTarget.cpp

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//===- OMPMarkDeclareTarget.cpp -------------------------------------------===//
1+
//===- MarkDeclareTarget.cpp -------------------------------------------===//
22
//
33
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
44
// See https://llvm.org/LICENSE.txt for license information.
@@ -28,9 +28,8 @@ namespace flangomp {
2828
} // namespace flangomp
2929

3030
namespace {
31-
class OMPMarkDeclareTargetPass
32-
: public flangomp::impl::OMPMarkDeclareTargetPassBase<
33-
OMPMarkDeclareTargetPass> {
31+
class MarkDeclareTargetPass
32+
: public flangomp::impl::MarkDeclareTargetPassBase<MarkDeclareTargetPass> {
3433

3534
void markNestedFuncs(mlir::omp::DeclareTargetDeviceType parentDevTy,
3635
mlir::omp::DeclareTargetCaptureClause parentCapClause,

0 commit comments

Comments
 (0)