circt
circt copied to clipboard
[StandardToHandshake] Remove intermediate conversion ops
Currently, the StandardToHandshake conversion uses several intermediate ops to aid in the lowering pass. Usually, intermediate ops may aid in reducing conversion pass complexity, through splitting up conversion into several smaller passes.
However, the StartOp, EndOp, TerminatorOps of the Handshake dialect are (as far as I am aware of) only used during the StandardToHandshake pass, and never live beyond them. Over time, we've experienced a bunch of issues with respect to these. More generally, these issues are linked to maintaining intermediate state in the IR as it is being rewritten - which has shown not to be a stable approach to writing conversion passes.
As far as I can tell, most use of the three aforementioned ops have been removed, and I expect it to be a fairly minor change to get rid of the remaining ones. Any load-bearing that these ops still perform should be moved to an in-memory intermediate state object maintained during the conversion pass.