MLIR 22.0.0git
LoopCanonicalization.cpp File Reference

Go to the source code of this file.

Classes

class  mlir::impl::SCFForLoopCanonicalizationBase< DerivedT >

Namespaces

namespace  mlir
 Include the generated interface declarations.
namespace  mlir::impl
 Attribute collections provide a dictionary-like interface.

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.

Referenced by mlir::impl::SCFForLoopCanonicalizationBase< DerivedT >::getDependentDialects().