Skip to content

[MLIR][mlir-link] Add appending linkage support #41

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

Merged
merged 6 commits into from
Jun 6, 2025

Conversation

Jezurko
Copy link
Collaborator

@Jezurko Jezurko commented Jun 2, 2025

No description provided.

@Jezurko Jezurko self-assigned this Jun 2, 2025
@Jezurko Jezurko force-pushed the robert/appending-linkage branch from f0be41a to 93943cc Compare June 5, 2025 06:39
@Jezurko Jezurko force-pushed the robert/appending-linkage branch from 93943cc to b50e519 Compare June 5, 2025 06:42
@Jezurko Jezurko marked this pull request as ready for review June 5, 2025 10:48
@Jezurko Jezurko requested a review from hbrodin June 5, 2025 10:48
Copy link
Collaborator

@hbrodin hbrodin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall it looks good. I haven't run it on the challenge yet, but I only have minor comments that you could consider.

Comment on lines 265 to 272
if (isAppendingLinkage(dstLinkage)) {
auto &toAppend = append[derived.getSymbol(pair.src)];
if (toAppend.empty())
toAppend.push_back(pair.dst);
if (!derived.isDeclaration(pair.src)) {
toAppend.push_back(pair.src);
}
return ConflictResolution::LinkFromSrc;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Isn't it a bit unfortunate that we call it getConflictResolution and then add to the list? Maybe there was no other way? Also, the name really suggests the const to be still there...

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I might be able to override resolveConflict and move the list insertion there. I will check

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep, should be fixed now

Copy link
Collaborator

@hbrodin hbrodin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@Jezurko Jezurko merged commit 2c3470d into main Jun 6, 2025
9 checks passed
@Jezurko Jezurko deleted the robert/appending-linkage branch June 6, 2025 11:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants