Skip to content
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

Merged
merged 1 commit into from
May 11, 2016

Conversation

rajatd
Copy link
Contributor

@rajatd rajatd commented May 9, 2016

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 Reviewable

@rajatd
Copy link
Contributor Author

rajatd commented May 9, 2016

@pleath @MikeHolman @LouisLaf

// Add helper label to trigger layout.
if (collectRuntimeStatsLabel)
{
collectRuntimeStatsLabel->Unlink();
Copy link
Contributor

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.

Copy link
Contributor Author

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.

Copy link
Contributor

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

@pleath
Copy link
Contributor

pleath commented May 11, 2016

LGTM.

@rajatd
Copy link
Contributor Author

rajatd commented May 11, 2016

Thanks, merging.

@chakrabot chakrabot merged commit dc20aef into chakra-core:release/1.2 May 11, 2016
chakrabot pushed a commit that referenced this pull request May 11, 2016
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.
chakrabot pushed a commit that referenced this pull request May 11, 2016
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.
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.

5 participants