MLIR  20.0.0git
Macros | Functions
Hoisting.cpp File Reference
#include "mlir/Dialect/Linalg/Transforms/Hoisting.h"
#include "mlir/Analysis/SliceAnalysis.h"
#include "mlir/Dialect/Affine/Analysis/AffineStructures.h"
#include "mlir/Dialect/Affine/IR/AffineOps.h"
#include "mlir/Dialect/Affine/IR/AffineValueMap.h"
#include "mlir/Dialect/Affine/Utils.h"
#include "mlir/Dialect/Arith/IR/Arith.h"
#include "mlir/Dialect/Func/IR/FuncOps.h"
#include "mlir/Dialect/Linalg/IR/Linalg.h"
#include "mlir/Dialect/Linalg/Transforms/Transforms.h"
#include "mlir/Dialect/SCF/IR/SCF.h"
#include "mlir/Dialect/SCF/Utils/Utils.h"
#include "mlir/Dialect/Tensor/IR/Tensor.h"
#include "mlir/Dialect/Vector/IR/VectorOps.h"
#include "mlir/Dialect/Vector/Utils/VectorUtils.h"
#include "mlir/IR/BuiltinOps.h"
#include "mlir/IR/Dominance.h"
#include "mlir/Transforms/GreedyPatternRewriteDriver.h"
#include "mlir/Transforms/LoopInvariantCodeMotionUtils.h"
#include "llvm/ADT/StringRef.h"
#include "llvm/ADT/TypeSwitch.h"
#include "llvm/Support/Debug.h"

Go to the source code of this file.

Macros

#define DEBUG_TYPE   "linalg-hoisting"
 
#define DBGS()   (dbgs() << '[' << DEBUG_TYPE << "] ")
 

Functions

static scf::ForOp replaceWithDifferentYield (RewriterBase &rewriter, scf::ForOp loop, Value newInitOperand, unsigned index, Value newYieldValue)
 Replace loop with a new loop that has a different init operand at position index. More...
 
static bool noAliasingUseInLoop (vector::TransferReadOp transferRead, LoopLikeOpInterface loop)
 

Macro Definition Documentation

◆ DBGS

#define DBGS ( )    (dbgs() << '[' << DEBUG_TYPE << "] ")

Definition at line 41 of file Hoisting.cpp.

◆ DEBUG_TYPE

#define DEBUG_TYPE   "linalg-hoisting"

Definition at line 39 of file Hoisting.cpp.

Function Documentation

◆ noAliasingUseInLoop()

static bool noAliasingUseInLoop ( vector::TransferReadOp  transferRead,
LoopLikeOpInterface  loop 
)
static

◆ replaceWithDifferentYield()

static scf::ForOp replaceWithDifferentYield ( RewriterBase rewriter,
scf::ForOp  loop,
Value  newInitOperand,
unsigned  index,
Value  newYieldValue 
)
static

Replace loop with a new loop that has a different init operand at position index.

The body of this loop is moved over to the new loop.

newInitOperands specifies the replacement "init" operands. newYieldValue is the replacement yield value of the loop at position index.

Definition at line 52 of file Hoisting.cpp.

References mlir::OpBuilder::create(), mlir::RewriterBase::mergeBlocks(), mlir::RewriterBase::replaceOp(), and mlir::OpBuilder::setInsertionPoint().

Referenced by mlir::linalg::hoistRedundantVectorBroadcasts().