[MLIR] Add folder for zero trip count affine.for
AffineForOp's folding hook is expected to fold away trivially empty affine.for. This allows simplification to happen as part of the canonicalizer and from wherever the folding hook is used. While more complex analysis based zero trip count detection is available from other passes in analysis and transforms, simple and inexpensive folding had been missing. Also, update/improve affine.for op documentation clarifying semantics of the result values for zero trip count loops. Differential Revision: https://reviews.llvm.org/D106123
Loading
Please sign in to comment