MLIR  20.0.0git
Namespaces | Macros | Functions
AffineLoopInvariantCodeMotion.cpp File Reference
#include "mlir/Dialect/Affine/Passes.h"
#include "mlir/Dialect/Affine/Analysis/Utils.h"
#include "mlir/Dialect/Func/IR/FuncOps.h"
#include "mlir/Interfaces/SideEffectInterfaces.h"
#include "llvm/Support/Debug.h"
#include "llvm/Support/raw_ostream.h"
#include "mlir/Dialect/Affine/Passes.h.inc"

Go to the source code of this file.

Namespaces

 mlir
 Include the generated interface declarations.
 
 mlir::affine
 

Macros

#define GEN_PASS_DEF_AFFINELOOPINVARIANTCODEMOTION
 
#define DEBUG_TYPE   "affine-licm"
 

Functions

static bool checkInvarianceOfNestedIfOps (AffineIfOp ifOp, AffineForOp loop, SmallPtrSetImpl< Operation * > &opsWithUsers, SmallPtrSetImpl< Operation * > &opsToHoist)
 
static bool isOpLoopInvariant (Operation &op, AffineForOp loop, SmallPtrSetImpl< Operation * > &opsWithUsers, SmallPtrSetImpl< Operation * > &opsToHoist)
 Returns true if op is invariant on loop. More...
 
static bool areAllOpsInTheBlockListInvariant (Region &blockList, AffineForOp loop, SmallPtrSetImpl< Operation * > &opsWithUsers, SmallPtrSetImpl< Operation * > &opsToHoist)
 

Macro Definition Documentation

◆ DEBUG_TYPE

#define DEBUG_TYPE   "affine-licm"

Definition at line 28 of file AffineLoopInvariantCodeMotion.cpp.

◆ GEN_PASS_DEF_AFFINELOOPINVARIANTCODEMOTION

#define GEN_PASS_DEF_AFFINELOOPINVARIANTCODEMOTION

Definition at line 23 of file AffineLoopInvariantCodeMotion.cpp.

Function Documentation

◆ areAllOpsInTheBlockListInvariant()

static bool areAllOpsInTheBlockListInvariant ( Region blockList,
AffineForOp  loop,
SmallPtrSetImpl< Operation * > &  opsWithUsers,
SmallPtrSetImpl< Operation * > &  opsToHoist 
)
static

◆ checkInvarianceOfNestedIfOps()

static bool checkInvarianceOfNestedIfOps ( AffineIfOp  ifOp,
AffineForOp  loop,
SmallPtrSetImpl< Operation * > &  opsWithUsers,
SmallPtrSetImpl< Operation * > &  opsToHoist 
)
static

Definition at line 157 of file AffineLoopInvariantCodeMotion.cpp.

References areAllOpsInTheBlockListInvariant().

Referenced by isOpLoopInvariant().

◆ isOpLoopInvariant()

static bool isOpLoopInvariant ( Operation op,
AffineForOp  loop,
SmallPtrSetImpl< Operation * > &  opsWithUsers,
SmallPtrSetImpl< Operation * > &  opsToHoist 
)
static