-
Notifications
You must be signed in to change notification settings - Fork 81
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
[RFC] Name mangling in IRModules #84
Conversation
Thanks @gigiblender ! a few points for consideration:
In addition to that, it would be really nice to get some smart naming resolve mechanism. For example, it would be really nice to have the following effect (by parsing the suffix integer separately from prefix string x = get_next_name("fun12", existing_names=["func12", "func13", "func4"])
assert x == "func14" This is to avoid the case where we have "func12_0_0_0_0" when multiple set of prefixes are called and they usually looks confusion. |
Thank you for feedback @tqchen! I agree with your suggestions and amended the text with further clarifications. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Thanks so much for doing this -- you should get a nice (and hopefully satisfying) cascade of simplifications and code deletion.
A couple of thoughts...
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If nothing else, this should not generate new IR, only names.
|
Thanks for the comments @kparzysz-quic. I agree that we could have the Regarding the @mbs-octoml @tqchen any thoughts? |
In this context, it is helpful to look at existing practices. This is a topic related to linking in most compilers, and they are closely related to the linkage type.
There are more linkage types in LLVM but this two types roughly are sufficient for our discussion purposes. Now come back to our context, we roughly need two things:
Note that N0 means we cannot simply enforce a
|
@tqchen i think one goal we should have with this RFC is to codify things like
the purpose is not to codify it so that we can't change it, but just so that we are all on the same page here. perhaps we can incorporate definitions like this into the RFC text and into helper functions? |
i've put this RFC on the meeting agenda for this week's Community Meeting |
I agree |
Adding a draft PR to this discussion. |
we discussed this at the community meeting yesterday. here are notes:
|
8da54f3
to
df1dad9
Compare
@gigiblender is this ready for a last review? |
@areusch yes |
thanks @gigiblender , the RFC has been accepted! please create a tracking issue and mention this PR in that issue to link it. |
Rendered