This is an archive of the discontinued LLVM Phabricator instance.

[mlir] Add `test-convergence` option to Canonicalizer tests
ClosedPublic

Authored by springerm on Jan 3 2023, 1:03 AM.

Details

Summary

This new option is set to false by default. It should be set only in Canonicalizer tests to detect faulty canonicalization patterns. I.e., patterns that prevent the canonicalizer from converging. The canonicalizer should always convergence on such small unit tests that we have in canonicalize.mlir.

Two faulty canonicalization patterns were detected and fixed with this change.

Depends On: D140729

Diff Detail

Event Timeline

springerm created this revision.Jan 3 2023, 1:03 AM
springerm requested review of this revision.Jan 3 2023, 1:03 AM
mehdi_amini accepted this revision.Jan 3 2023, 3:03 AM
mehdi_amini added inline comments.
mlir/test/Transforms/canonicalize.mlir
1

Can you keep the -pass-pipeline form? In general I would prefer we stick to it: it is less ambiguous in the intent.

This revision is now accepted and ready to land.Jan 3 2023, 3:03 AM
springerm added inline comments.Jan 3 2023, 3:11 AM
mlir/test/Transforms/canonicalize.mlir
1

I've seen mixed usage across all canonicalize.mlir. Why is -pass-pipeline better here? It's just a single pass in these tests.

This revision was landed with ongoing or failed builds.Jan 4 2023, 3:02 AM
This revision was automatically updated to reflect the committed changes.