Bug 150511 - Air needs a late register liveness phase that calls Special::reportUsedRegisters()
Summary: Air needs a late register liveness phase that calls Special::reportUsedRegist...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: WebKit Nightly Build
Hardware: All All
: P2 Normal
Assignee: Filip Pizlo
URL:
Keywords:
Depends on:
Blocks: 150279 150750
  Show dependency treegraph
 
Reported: 2015-10-23 13:03 PDT by Filip Pizlo
Modified: 2015-10-31 16:02 PDT (History)
10 users (show)

See Also:


Attachments
the patch (12.21 KB, patch)
2015-10-30 19:47 PDT, Filip Pizlo
saam: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Filip Pizlo 2015-10-23 13:03:07 PDT
Otherwise, stackmaps will think that no registers are in use.
Comment 1 Filip Pizlo 2015-10-30 19:47:17 PDT
Created attachment 264462 [details]
the patch
Comment 2 Saam Barati 2015-10-30 22:37:30 PDT
Comment on attachment 264462 [details]
the patch

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

LGTM

> Source/JavaScriptCore/b3/air/AirGenerate.cpp:79
> +    recordUsedRegisters(code);

Do we cache the results of the used registers?
If not, maybe a better name would be just reportUsedRegisters like the function name?

> Source/JavaScriptCore/b3/air/AirRecordUsedRegisters.cpp:67
> +

Style: I think we can drop the new lines at the end of the file.

> Source/JavaScriptCore/b3/air/AirRecordUsedRegisters.h:35
> +// This allocates StackSlots to places on the stack. It first allocates the pinned ones in index

Is this really what this phase does?
Comment 3 Filip Pizlo 2015-10-30 23:39:55 PDT
(In reply to comment #2)
> Comment on attachment 264462 [details]
> the patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=264462&action=review
> 
> LGTM
> 
> > Source/JavaScriptCore/b3/air/AirGenerate.cpp:79
> > +    recordUsedRegisters(code);
> 
> Do we cache the results of the used registers?
> If not, maybe a better name would be just reportUsedRegisters like the
> function name?

Good point.

> 
> > Source/JavaScriptCore/b3/air/AirRecordUsedRegisters.cpp:67
> > +
> 
> Style: I think we can drop the new lines at the end of the file.

OK.

> 
> > Source/JavaScriptCore/b3/air/AirRecordUsedRegisters.h:35
> > +// This allocates StackSlots to places on the stack. It first allocates the pinned ones in index
> 
> Is this really what this phase does?

Ooops!
Comment 4 Filip Pizlo 2015-10-31 16:02:56 PDT
Landed in http://trac.webkit.org/changeset/191845