Bug 185281 - OSR entry pruning of Program Bytecodes doesn't take into account try/catch
Summary: OSR entry pruning of Program Bytecodes doesn't take into account try/catch
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Michael Saboff
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2018-05-03 17:11 PDT by Michael Saboff
Modified: 2018-05-03 18:11 PDT (History)
5 users (show)

See Also:


Attachments
Patch (4.09 KB, patch)
2018-05-03 17:24 PDT, Michael Saboff
no flags Details | Formatted Diff | Diff
Updated Patch (4.01 KB, patch)
2018-05-03 17:48 PDT, Michael Saboff
saam: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Saboff 2018-05-03 17:11:37 PDT
In the baseline, we have an optimization where we prune unreachable code beginning from the instruction we OSR entry to.  This pruning needs to take into account the reachability from local catch statements.
Comment 1 Michael Saboff 2018-05-03 17:12:08 PDT
<rdar://problem/39456551>
Comment 2 Michael Saboff 2018-05-03 17:24:05 PDT
Created attachment 339494 [details]
Patch
Comment 3 Michael Saboff 2018-05-03 17:48:46 PDT
Created attachment 339497 [details]
Updated Patch
Comment 4 Saam Barati 2018-05-03 17:50:29 PDT
Comment on attachment 339497 [details]
Updated Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=339497&action=review

r=me

> Source/JavaScriptCore/jit/JIT.cpp:203
> +

please delete.

> Source/JavaScriptCore/jit/JIT.cpp:228
> +                for (unsigned bytecodeOffset = block->leaderOffset(); bytecodeOffset < block->leaderOffset() + block->totalLength();) {

Can we skip this loop if the program has no catch handlers?
Comment 5 Michael Saboff 2018-05-03 18:00:50 PDT
(In reply to Saam Barati from comment #4)
> Comment on attachment 339497 [details]
> Updated Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=339497&action=review
> 
> r=me
> 
> > Source/JavaScriptCore/jit/JIT.cpp:203
> > +
> 
> please delete.
> 
> > Source/JavaScriptCore/jit/JIT.cpp:228
> > +                for (unsigned bytecodeOffset = block->leaderOffset(); bytecodeOffset < block->leaderOffset() + block->totalLength();) {
> 
> Can we skip this loop if the program has no catch handlers?

I'll take care of those changes locally before landing.
Comment 6 Michael Saboff 2018-05-03 18:11:49 PDT
Committed r231343: <https://trac.webkit.org/changeset/231343>