MLIR
16.0.0git
|
#include "PassDetail.h"
#include "mlir/Dialect/MemRef/IR/MemRef.h"
#include "mlir/Dialect/SCF/IR/SCF.h"
#include "mlir/Dialect/SCF/Transforms/Passes.h"
#include "mlir/Dialect/SCF/Transforms/Transforms.h"
#include "mlir/IR/BlockAndValueMapping.h"
#include "mlir/IR/Builders.h"
#include "mlir/IR/OpDefinition.h"
Go to the source code of this file.
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 BlockAndValueMapping &firstToSecondPloopIndices) |
Checks if the parallel loops have mixed access to the same buffers. More... | |
static LogicalResult | verifyDependencies (ParallelOp firstPloop, ParallelOp secondPloop, const BlockAndValueMapping &firstToSecondPloopIndices) |
Analyzes dependencies in the most primitive way by checking simple read and write patterns. More... | |
static bool | isFusionLegal (ParallelOp firstPloop, ParallelOp secondPloop, const BlockAndValueMapping &firstToSecondPloopIndices) |
static void | fuseIfLegal (ParallelOp firstPloop, ParallelOp secondPloop, OpBuilder b) |
Prepends operations of firstPloop's body into secondPloop's body. More... | |
|
static |
Verify equal iteration spaces.
Definition at line 33 of file ParallelLoopFusion.cpp.
Referenced by isFusionLegal().
Prepends operations of firstPloop's body into secondPloop's body.
Definition at line 118 of file ParallelLoopFusion.cpp.
References mlir::OpBuilder::clone(), mlir::Operation::erase(), isFusionLegal(), mlir::BlockAndValueMapping::map(), and mlir::OpBuilder::setInsertionPointToStart().
Referenced by mlir::scf::naivelyFuseParallelOps().
|
static |
Verify there are no nested ParallelOps.
Definition at line 26 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 53 of file ParallelLoopFusion.cpp.
References mlir::WalkResult::advance(), mlir::WalkResult::interrupt(), and mlir::BlockAndValueMapping::lookupOrDefault().
Referenced by verifyDependencies().
|
static |
Definition at line 108 of file ParallelLoopFusion.cpp.
References equalIterationSpaces(), hasNestedParallelOp(), mlir::succeeded(), and verifyDependencies().
Referenced by fuseIfLegal().
|
static |
Analyzes dependencies in the most primitive way by checking simple read and write patterns.
Definition at line 94 of file ParallelLoopFusion.cpp.
References mlir::failure(), haveNoReadsAfterWriteExceptSameIndex(), mlir::BlockAndValueMapping::map(), and mlir::success().
Referenced by isFusionLegal().