MLIR
20.0.0git
|
#include "mlir/Dialect/SCF/Transforms/Passes.h"
#include "mlir/Analysis/AliasAnalysis.h"
#include "mlir/Dialect/MemRef/IR/MemRef.h"
#include "mlir/Dialect/SCF/IR/SCF.h"
#include "mlir/Dialect/SCF/Transforms/Transforms.h"
#include "mlir/IR/Builders.h"
#include "mlir/IR/IRMapping.h"
#include "mlir/IR/OpDefinition.h"
#include "mlir/IR/OperationSupport.h"
#include "mlir/Interfaces/SideEffectInterfaces.h"
#include "mlir/Dialect/SCF/Transforms/Passes.h.inc"
Go to the source code of this file.
Namespaces | |
mlir | |
Include the generated interface declarations. | |
Macros | |
#define | GEN_PASS_DEF_SCFPARALLELLOOPFUSION |
Functions | |
static bool | hasNestedParallelOp (ParallelOp ploop) |
Verify there are no nested ParallelOps. More... | |
static bool | equalIterationSpaces (ParallelOp firstPloop, ParallelOp secondPloop) |
Verify equal iteration spaces. More... | |
static bool | haveNoReadsAfterWriteExceptSameIndex (ParallelOp firstPloop, ParallelOp secondPloop, const IRMapping &firstToSecondPloopIndices, llvm::function_ref< bool(Value, Value)> mayAlias) |
Checks if the parallel loops have mixed access to the same buffers. More... | |
static LogicalResult | verifyDependencies (ParallelOp firstPloop, ParallelOp secondPloop, const IRMapping &firstToSecondPloopIndices, llvm::function_ref< bool(Value, Value)> mayAlias) |
Analyzes dependencies in the most primitive way by checking simple read and write patterns. More... | |
static bool | isFusionLegal (ParallelOp firstPloop, ParallelOp secondPloop, const IRMapping &firstToSecondPloopIndices, llvm::function_ref< bool(Value, Value)> mayAlias) |
static void | fuseIfLegal (ParallelOp firstPloop, ParallelOp &secondPloop, OpBuilder builder, llvm::function_ref< bool(Value, Value)> mayAlias) |
Prepends operations of firstPloop's body into secondPloop's body. More... | |
#define GEN_PASS_DEF_SCFPARALLELLOOPFUSION |
Definition at line 26 of file ParallelLoopFusion.cpp.
|
static |
Verify equal iteration spaces.
Definition at line 41 of file ParallelLoopFusion.cpp.
Referenced by isFusionLegal().
|
static |
Prepends operations of firstPloop's body into secondPloop's body.
Updates secondPloop with new loop.
Definition at line 165 of file ParallelLoopFusion.cpp.
References mlir::Block::begin(), mlir::OpBuilder::create(), mlir::detail::enumerate(), mlir::Block::front(), mlir::Block::getArguments(), mlir::Block::getTerminator(), mlir::Operation::getUsers(), mlir::RewriterBase::inlineBlockBefore(), isFusionLegal(), mlir::IRMapping::map(), mayAlias(), mlir::DominanceInfo::properlyDominates(), mlir::OpBuilder::setInsertionPoint(), and mlir::OpBuilder::setInsertionPointToEnd().
|
static |
Verify there are no nested ParallelOps.
Definition at line 34 of file ParallelLoopFusion.cpp.
References mlir::WalkResult::interrupt().
Referenced by isFusionLegal().
|
static |
Checks if the parallel loops have mixed access to the same buffers.
Returns true
if the first parallel loop writes to the same indices that the second loop reads.
Definition at line 61 of file ParallelLoopFusion.cpp.
References mlir::WalkResult::advance(), mlir::Value::getDefiningOp(), mlir::WalkResult::interrupt(), and mayAlias().
Referenced by verifyDependencies().
|
static |
Definition at line 153 of file ParallelLoopFusion.cpp.
References equalIterationSpaces(), hasNestedParallelOp(), mayAlias(), and verifyDependencies().
Referenced by fuseIfLegal().
|
static |
Analyzes dependencies in the most primitive way by checking simple read and write patterns.
Definition at line 139 of file ParallelLoopFusion.cpp.
References haveNoReadsAfterWriteExceptSameIndex(), mlir::IRMapping::map(), and mayAlias().
Referenced by isFusionLegal().