MLIR  16.0.0git
Functions
LoopCanonicalization.cpp File Reference
#include "PassDetail.h"
#include "mlir/Dialect/Affine/IR/AffineOps.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/Dialect/SCF/Utils/AffineCanonicalizationUtils.h"
#include "mlir/Dialect/Tensor/IR/Tensor.h"
#include "mlir/IR/PatternMatch.h"
#include "mlir/Transforms/GreedyPatternRewriteDriver.h"
#include "llvm/ADT/TypeSwitch.h"
+ Include dependency graph for LoopCanonicalization.cpp:

Go to the source code of this file.

Functions

static bool isShapePreserving (ForOp forOp, int64_t arg)
 A simple, conservative analysis to determine if the loop is shape conserving. More...
 

Function Documentation

◆ isShapePreserving()

static bool isShapePreserving ( ForOp  forOp,
int64_t  arg 
)
static

A simple, conservative analysis to determine if the loop is shape conserving.

I.e., the type of the arg-th yielded value is the same as the type of the corresponding basic block argument of the loop. Note: This function handles only simple cases. Expand as needed.

Definition at line 33 of file LoopCanonicalization.cpp.

References mlir::applyPatternsAndFoldGreedily(), mlir::scf::canonicalizeMinMaxOpInLoop(), mlir::Value::dyn_cast(), mlir::failed(), mlir::failure(), mlir::Value::getContext(), mlir::scf::getForeachThreadOpThreadIndexOwner(), mlir::scf::getForInductionVarOwner(), mlir::OpResult::getOwner(), mlir::scf::getParallelForInductionVarOwner(), mlir::OpResult::getResultNumber(), mlir::scf::populateSCFForLoopCanonicalizationPatterns(), mlir::success(), mlir::RewriterBase::updateRootInPlace(), and value.