-
Notifications
You must be signed in to change notification settings - Fork 286
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[ModuleInliner] Donot retop a HierPathOp if flattening the root #6515
Conversation
The test case is addressed by |
No, this is expected to do what the |
9697ce0
to
42a037b
Compare
Thanks, yes this should not turn legal IR into illegal IR 👍 . |
Thank you for investigating the issue and the fix makes sense to me:) I’m a bit concerned about partially duplicating symbol dce logic into inliner. Liveness of symbols is not solely determined by annotations users so this implementation could incorrectly erase hier path ops that are used by other operations such as XMRRef or Verbatim (though I think it won’t happen in the current pass ordering). Instead can we fix the issue by properly updating every hierpath in the IR, or tentatively regard symbol dce as a prepass of inliner? WDYT? |
I agree, the correct solution here is to update the inlining algorithm to not rely on the |
cc #4462 |
42a037b
to
bcc1eea
Compare
After spending hours staring at the code, I realized this is not the issue of removing dead NLAs, this issue exists even if the NLA is referenced from a |
bcc1eea
to
264254f
Compare
If a
HierPathOp
has a root module that is flattened and inlined, then donotretop the root module, this results in incorrect
HierPathOp
that as stalesymbols.
This commit fixes the issue.