-
Notifications
You must be signed in to change notification settings - Fork 21
fix: incorrect spec about int/float metadata flags #48
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
base: main
Are you sure you want to change the base?
fix: incorrect spec about int/float metadata flags #48
Conversation
@bettinaheim @idavis could you please review this PR? I wish the repository was configured to suggest default reviewers. Unsure if that's possible. |
!10 = !{!"i32", !"i64"} | ||
!11 = !{!"float", !"double"} |
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.
actually, on trying to implement these changes in a test branch where only i64
are supported, I've found that flags in this format fail linking with the error message:
incorrect number of operands in module flag `!5 = !{!"i64"}`
If there is only one supprted value, should it appear inline rather than as a separate flag?
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.
Whoops, never mind. I had a different mistake. The flag used as the reference cannot be listed in the !llvm.module.flags
. That's why I was getting an error. This syntax is fine.
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.
Hi @swernli, if I change my copy of the adaptive profile example program to just have !10 = !{!"i64"}
, I don't see any error flagged by LLVM. FYI, I also have !4 = !{i32 5, !"int_computations", !10}
.
If I try inlining, I still get an error as before this PR.
Perhaps, there is something else going on in your branch? What LLVM version are you using? And what does the attribute for int_computations
look like?
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.
Ah, I see you resolved it.
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.
Closes: #47