Bug 170459 - Don't need to Air::reportUsedRegisters for wasm at -O1
Summary: Don't need to Air::reportUsedRegisters for wasm at -O1
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:
 
Reported: 2017-04-04 11:08 PDT by Filip Pizlo
Modified: 2017-04-04 12:09 PDT (History)
9 users (show)

See Also:


Attachments
the patch (19.12 KB, patch)
2017-04-04 11:19 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 2017-04-04 11:08:17 PDT
Patch forthcoming.
Comment 1 Filip Pizlo 2017-04-04 11:19:43 PDT
Created attachment 306181 [details]
the patch
Comment 2 Saam Barati 2017-04-04 11:39:33 PDT
Comment on attachment 306181 [details]
the patch

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

r=me

> Source/JavaScriptCore/b3/B3StackmapGenerationParams.h:63
> +    // NOTE: This will report bogus information if you did proc.setNeedsUsedRegisters(false).

Can we make it crash, at least in debug builds?

> Source/JavaScriptCore/b3/air/AirLiveness.h:42
> +        SuperSamplerScope samplingScope(false);
> +        WTF::Liveness<Adapter>::compute();

Is the reason for this change just so you can time it?
Comment 3 Filip Pizlo 2017-04-04 11:49:05 PDT
(In reply to Saam Barati from comment #2)
> Comment on attachment 306181 [details]
> the patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=306181&action=review
> 
> r=me
> 
> > Source/JavaScriptCore/b3/B3StackmapGenerationParams.h:63
> > +    // NOTE: This will report bogus information if you did proc.setNeedsUsedRegisters(false).
> 
> Can we make it crash, at least in debug builds?

I'll add an assertion.

> 
> > Source/JavaScriptCore/b3/air/AirLiveness.h:42
> > +        SuperSamplerScope samplingScope(false);
> > +        WTF::Liveness<Adapter>::compute();
> 
> Is the reason for this change just so you can time it?

Yeah, it was just for timing.

There was a prior patch where I had done this same hack and then lost it.  It's super useful.
Comment 4 Filip Pizlo 2017-04-04 12:09:29 PDT
Landed in https://trac.webkit.org/changeset/214887/webkit