|
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/Dialect/OpenMP/Utils/Utils.h"#include "mlir/Pass/Pass.h"#include "llvm/ADT/STLExtras.h"#include "mlir/Dialect/OpenMP/Transforms/Passes.h.inc"Go to the source code of this file.
Classes | |
| class | mlir::omp::impl::StackToSharedPassBase< DerivedT > |
Namespaces | |
| namespace | mlir |
| Include the generated interface declarations. | |
| namespace | mlir::omp |
| namespace | mlir::omp::impl |
Functions | |
| std::unique_ptr<::mlir::Pass > | mlir::omp::createMarkDeclareTargetPass () |
| std::unique_ptr<::mlir::Pass > | mlir::omp::createPrepareForOMPOffloadPrivatizationPass () |
| std::unique_ptr<::mlir::Pass > | mlir::omp::createStackToSharedPass () |
| std::unique_ptr<::mlir::Pass > | mlir::omp::impl::createStackToSharedPass () |
| 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 | shouldReplaceAllocaWithDeviceSharedMem (Operation &op) |
| Tell whether to replace an operation representing a stack allocation with a device shared memory allocation/deallocation pair based on the location of the allocation and its uses. | |
| static void | insertDeviceSharedMemDeallocation (OpBuilder &builder, TypeAttr elemType, Value arraySize, IntegerAttr alignment, Value allocVal) |
| Based on the location of the definition of the given value representing the result of a device shared memory allocation, find the corresponding points where its deallocation should be placed and introduce omp.free_shared_mem ops at those points. | |
| #define GEN_PASS_DECL_MARKDECLARETARGETPASS |
| #define GEN_PASS_DECL_PREPAREFOROMPOFFLOADPRIVATIZATIONPASS |
| #define GEN_PASS_DECL_STACKTOSHAREDPASS |
| #define GEN_PASS_DEF_STACKTOSHAREDPASS |
Definition at line 24 of file StackToShared.cpp.
| #define GEN_PASS_REGISTRATION_MARKDECLARETARGETPASS |
| #define GEN_PASS_REGISTRATION_PREPAREFOROMPOFFLOADPRIVATIZATIONPASS |
| #define GEN_PASS_REGISTRATION_STACKTOSHAREDPASS |
|
static |
Based on the location of the definition of the given value representing the result of a device shared memory allocation, find the corresponding points where its deallocation should be placed and introduce omp.free_shared_mem ops at those points.
Definition at line 45 of file StackToShared.cpp.
References mlir::DominanceInfo::dominates(), mlir::Region::getBlocks(), mlir::Value::getLoc(), mlir::Value::getParentBlock(), mlir::Value::getParentRegion(), mlir::Operation::hasSuccessors(), and mlir::OpBuilder::setInsertionPoint().
Tell whether to replace an operation representing a stack allocation with a device shared memory allocation/deallocation pair based on the location of the allocation and its uses.
Definition at line 34 of file StackToShared.cpp.
References mlir::Operation::getResults(), mlir::omp::opInSharedDeviceContext(), and result.