google / google/heir

Reduce reliance on main "canonicalize" pattern

Open
#1,069 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
MLIR
Stars
906
Forks
171
Avg merge
4d 12h
Merged PRs (30d)
32

Description

![Image](https://github.com/user-attachments/assets/ae9cfef8-704e-47dd-a4b0-bbe25d5ed0f9)

I think the correct thing here is to do the following:

- where we rely on specific canonicalization patterns as an integral part of the pass pipeline, put those patterns in a specific name passed, so that if they ever get removed/etc upstream, we don't get sudden failures without warning)
- Verify that all pipelines still produce code succesfully if the canonicalization is removed/replaced with no-op
- how to efficiently set all canonicalize passes to no-op? (Maybe overwrite the definition of addCanonicalizerPass to be no-op?)
- how to efficiently check that the output is still "correct" even though it's now syntactically different (i.e., FileCheck tests will fail?)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.