-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Fixing bug with shared bailouts #958
Conversation
// Add helper label to trigger layout. | ||
if (collectRuntimeStatsLabel) | ||
{ | ||
collectRuntimeStatsLabel->Unlink(); |
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.
I wonder if we're asking for trouble unlinking a label that the caller already put in the IR stream (presumably for reasons of its own). Would it work to assert that the label is already unlinked? Is there a caller that requires unlinking now? If so, I wonder if the caller shouldn't unlink it itself.
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.. The lowering functions for InlineMathFloor et.al. require unlinking now. I could, however, not insert the label in those routines and just pass it to GenerateBailout as collectRuntimeStatsLabel and insert it before the current instruction there.
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.
That sounds better to me. The logic in the caller shouldn’t require/expect the label to remain where it was put in the IR stream.
--Paul
From: Rajat Dua [mailto:notifications@github.com]
Sent: Monday, May 9, 2016 5:20 PM
To: Microsoft/ChakraCore ChakraCore@noreply.github.com
Cc: Paul Leathers pleath@microsoft.com; Mention mention@noreply.github.com
Subject: Re: [Microsoft/ChakraCore] Fixing bug with shared bailouts (#958)
In lib/Backend/Lower.cpphttps://github.com//pull/958#discussion_r62595416:
@@ -12174,14 +12173,21 @@ Lowerer::GenerateBailOut(IR::Instr * instr, IR::BranchInstr * branchInstr, IR::L
return bailOutLabel; }
- // Add helper label to trigger layout.
- if (collectRuntimeStatsLabel)
- {
collectRuntimeStatsLabel->Unlink();
Hmm.. The lowering functions for InlineMathFloor et.al. require unlinking now. I could, however, not insert the label in those routines and just pass it to GenerateBailout as collectRuntimeStatsLabel and insert it before the current instruction there.
—
You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHubhttps://github.com//pull/958/files/a596859bd23086a43a5027cab91cc8696ac6d331#r62595416
LGTM. |
Thanks, merging. |
Merge pull request #958 from rajatd:bailoutArmBug Shared bailouts for InlineMathFloor/Ceil/Round were bypassing the code on the bailout path that sets up data specific to a bailout (bailout kind, polymorphic inline cache index etc.) on the bailout record and were jumping directly to the bailout label. Fixed that.
Merge pull request #958 from rajatd:bailoutArmBug Shared bailouts for InlineMathFloor/Ceil/Round were bypassing the code on the bailout path that sets up data specific to a bailout (bailout kind, polymorphic inline cache index etc.) on the bailout record and were jumping directly to the bailout label. Fixed that.
Shared bailouts for InlineMathFloor/Ceil/Round were bypassing the code on the bailout path that sets up data specific to a bailout (bailout kind, polymorphic inline cache index etc.) on the bailout record and were jumping directly to the bailout label. Fixed that.
This change is