-
Notifications
You must be signed in to change notification settings - Fork 244
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
Inliner: rewrite IDs on decorations fix #1059
Inliner: rewrite IDs on decorations fix #1059
Conversation
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.
You need to duplicate annotations on inlining, not modifying the original - you should try testing with multiple call sites. (also, you should update the CHANGELOG)
cd4d786
to
d2ec9f6
Compare
// NOTE(siebencorgie): We don't care *what* decoration we rewrite atm. AFAIK there is no case where rewriting | ||
// the decoration on inline wouldn't be valid. | ||
for annotation_idx in 0..self.annotations.len() { | ||
if self.annotations[annotation_idx].class.opcode == Op::Decorate { |
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.
Hmm this is enough for your usecase but it should be possible to extend it to all decorate instructions (which I'll need for late zombie reporting).
Rebase failed
bdb94ee
to
24d48fd
Compare
Sorry for the force push to your branch, had to rebase it to land it (I wonder if it's because of the merge commit you had - next time, use |
Currently the inliner only rewrites IDs in the 'inlined_callee_blocks'. Therefore 'OpDecorate %id' on any '%id' that is rewritten is lost in this pass.
This fix applies the rewrite rules to all decorations as well.