Skip to content
This repository was archived by the owner on Apr 23, 2021. It is now read-only.
This repository was archived by the owner on Apr 23, 2021. It is now read-only.

Consider trip count in loop invariant code motion #194

@sherhut

Description

@sherhut

The current loop-invariant code motion pass does not consider trip counts when optimizing loops. This should be added to avoid hoisting code out of loops that actually never execute and hence adding additional computation.

The loop-like interface should probably grow a method to query whether a loop has a statically known trip count. For AffineFor, this can be answered using the mlir::getConstantTripCount(AffineForOp forOp) helper.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions