circt icon indicating copy to clipboard operation
circt copied to clipboard

[Handshake] Fix canonicalizer not going through rewriter for RAUW.

Open dtzSiFive opened this issue 1 year ago • 4 comments

Detected by -DMLIR_ENABLE_EXPENSIVE_PATTERN_API_CHECKS=ON.

cc #7047.

dtzSiFive avatar May 16 '24 16:05 dtzSiFive

Is modifyOpInPlace not a valid thing to use anymore? It's generally used for good reason. There may be some subtlety here that necessitates it.

Thanks for taking a critical look here!

The RAUW's are updating ops using parentForkOp results, not that op itself, which is what I think was going wrong and addressed here. Possibly could keep it and also use rewriter for the RAUW from within? 🤔

dtzSiFive avatar May 16 '24 19:05 dtzSiFive

I'm not sure. Did Morten write this code? If so, the conservative thing to do is to wait for him to come back from vacation and get his review. Should be back in two or three weeks, but this doesn't seem urgent... yes?

teqdruid avatar May 16 '24 20:05 teqdruid

I'm not sure. Did Morten write this code? If so, the conservative thing to do is to wait for him to come back from vacation and get his review. Should be back in two or three weeks, but this doesn't seem urgent... yes?

Not urgent AFAIK. Sounds good to me, thanks!

dtzSiFive avatar May 16 '24 20:05 dtzSiFive

I don't think that there was any particular reason for this, but it might be still sensible to wait for Morten to confirm.

Dinistro avatar May 17 '24 08:05 Dinistro

I can come up with no good arguemnt for why modifyOpInPlace was used, instead of notifying things through the rewriter. Tests pass, so LGTM - Thank you!

mortbopet avatar Jun 03 '24 09:06 mortbopet