MLIR 23.0.0git
LoopCanonicalization.cpp File Reference

Go to the source code of this file.

Namespaces

namespace  mlir
 Include the generated interface declarations.

Macros

#define GEN_PASS_DEF_SCFFORLOOPCANONICALIZATION

Functions

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

Macro Definition Documentation

◆ GEN_PASS_DEF_SCFFORLOOPCANONICALIZATION

#define GEN_PASS_DEF_SCFFORLOOPCANONICALIZATION

Definition at line 27 of file LoopCanonicalization.cpp.

Function Documentation

◆ isShapePreserving()

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 38 of file LoopCanonicalization.cpp.

References mlir::OpResult::getOwner(), mlir::OpResult::getResultNumber(), and isShapePreserving().

Referenced by isShapePreserving().