This is an archive of the discontinued LLVM Phabricator instance.

[mlir] Fix a bug in Affine LICM.
ClosedPublic

Authored by ayzhuang on Oct 4 2021, 12:14 PM.

Details

Summary

Currently Affine LICM checks iterOperands and does not hoist out any instruction containing iterOperands. We should check iterArgs instead.

Diff Detail

Event Timeline

ayzhuang created this revision.Oct 4 2021, 12:14 PM
ayzhuang requested review of this revision.Oct 4 2021, 12:14 PM
bondhugula accepted this revision.Oct 5 2021, 10:31 PM

Thanks for fixing this! Minor comment below.

mlir/test/Dialect/Affine/affine-loop-invariant-code-motion.mlir
734–738

Can you please indent to maintain the input nesting for readability?

This revision is now accepted and ready to land.Oct 5 2021, 10:31 PM
ayzhuang updated this revision to Diff 377559.Oct 6 2021, 8:36 AM

Address review comment to indent test.

bondhugula accepted this revision.Oct 6 2021, 7:09 PM

@bondhugula Thank you for the review. We'll merge it tomorrow if there are no more comments.

This revision was automatically updated to reflect the committed changes.