|
MLIR 23.0.0git
|
#include "mlir/Dialect/OpenMP/Transforms/Passes.h"#include "mlir/Dialect/LLVMIR/LLVMDialect.h"#include "mlir/Dialect/OpenMP/OpenMPDialect.h"#include "mlir/Interfaces/FunctionInterfaces.h"#include "mlir/Dialect/OpenMP/Transforms/Passes.h.inc"Go to the source code of this file.
Classes | |
| class | mlir::omp::impl::HostOpFilteringPassBase< DerivedT > |
Namespaces | |
| namespace | mlir |
| Include the generated interface declarations. | |
| namespace | mlir::omp |
| namespace | mlir::omp::impl |
Functions | |
| std::unique_ptr<::mlir::Pass > | mlir::omp::createHostOpFilteringPass () |
| std::unique_ptr<::mlir::Pass > | mlir::omp::impl::createHostOpFilteringPass () |
| std::unique_ptr<::mlir::Pass > | mlir::omp::createMarkDeclareTargetPass () |
| std::unique_ptr<::mlir::Pass > | mlir::omp::createPrepareForOMPOffloadPrivatizationPass () |
| std::unique_ptr<::mlir::Pass > | mlir::omp::createStackToSharedPass () |
| void | mlir::omp::registerHostOpFilteringPass () |
| void | mlir::omp::registerHostOpFilteringPassPass () |
| void | mlir::omp::registerMarkDeclareTargetPass () |
| void | mlir::omp::registerMarkDeclareTargetPassPass () |
| void | mlir::omp::registerPrepareForOMPOffloadPrivatizationPass () |
| void | mlir::omp::registerPrepareForOMPOffloadPrivatizationPassPass () |
| void | mlir::omp::registerStackToSharedPass () |
| void | mlir::omp::registerStackToSharedPassPass () |
| void | mlir::omp::registerOpenMPPasses () |
| static bool | keepHostOpInDevice (Operation &op) |
Some host operations, like llvm.mlir.addressof and constants, must remain in the device module because they impact how device code is generated when attached to an omp.target operation. | |
| static void | collectRewrite (omp::MapInfoOp mapOp, llvm::SetVector< omp::MapInfoOp > &rewrites) |
Add an omp.map.info operation and all its members recursively to the output set to be later rewritten. | |
| static void | collectRewrite (Value value, llvm::SetVector< Value > &rewrites) |
| Add the given value to a sorted set if it should be replaced by a placeholder when used as an operand that must remain for the device. | |
| static std::optional< omp::DeclareTargetDeviceType > | getDeclareTargetDevice (Operation &op) |
Provide the device_type of an omp.declare_target attribute, if defined. | |
| #define GEN_PASS_DECL_HOSTOPFILTERINGPASS |
| #define GEN_PASS_DECL_MARKDECLARETARGETPASS |
| #define GEN_PASS_DECL_PREPAREFOROMPOFFLOADPRIVATIZATIONPASS |
| #define GEN_PASS_DECL_STACKTOSHAREDPASS |
| #define GEN_PASS_DEF_HOSTOPFILTERINGPASS |
Definition at line 22 of file HostOpFiltering.cpp.
| #define GEN_PASS_REGISTRATION_HOSTOPFILTERINGPASS |
| #define GEN_PASS_REGISTRATION_MARKDECLARETARGETPASS |
| #define GEN_PASS_REGISTRATION_PREPAREFOROMPOFFLOADPRIVATIZATIONPASS |
| #define GEN_PASS_REGISTRATION_STACKTOSHAREDPASS |
|
static |
Add an omp.map.info operation and all its members recursively to the output set to be later rewritten.
Dependencies across omp.map.info are maintained by ensuring dependencies are added to the output sets before operations based on them.
Definition at line 47 of file HostOpFiltering.cpp.
Referenced by mlir::omp::impl::HostOpFilteringPassBase< DerivedT >::getPassName().
|
static |
Add the given value to a sorted set if it should be replaced by a placeholder when used as an operand that must remain for the device.
Values that are block arguments of function operations are skipped, since they will still be available after all rewrites are completed, and operands of operations that need to remain on the host are recursively collected.
Definition at line 61 of file HostOpFiltering.cpp.
|
static |
Provide the device_type of an omp.declare_target attribute, if defined.
Definition at line 79 of file HostOpFiltering.cpp.
Some host operations, like llvm.mlir.addressof and constants, must remain in the device module because they impact how device code is generated when attached to an omp.target operation.
This function identifies the operations that need this special handling. This includes cast-style operations to avoid losing information about the original source of an operand.
Definition at line 36 of file HostOpFiltering.cpp.