Bug 152668 - FTL B3 should do binary snippets
Summary: FTL B3 should do binary snippets
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: WebKit Nightly Build
Hardware: All All
: P2 Normal
Assignee: Filip Pizlo
Depends on: 152669 152705 152709 152713
Blocks: 151808
  Show dependency treegraph
Reported: 2016-01-03 12:24 PST by Filip Pizlo
Modified: 2016-01-04 15:09 PST (History)
5 users (show)

See Also:

the patch (14.60 KB, patch)
2016-01-04 15:01 PST, Filip Pizlo
mark.lam: 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 2016-01-03 12:24:47 PST
Patches forthcoming.
Comment 1 Filip Pizlo 2016-01-03 12:28:29 PST
My approach here will be to beef up B3 to the point where the FTL B3 binary snippet code generators don't have to do weird things with scratch registers and tag registers.

We can already use patchpoint constraints to force the tag registers to contain tag values.  We just would use ValueRep::reg(...).  This will actually do the Right Thing, since the tag values are already forced into registers.  So, this will probably just force B3 to use the JSC tag registers to hold the tag values.  Even if this doesn't quite happen and B3 emits some mov's to put the tag values into the tag registers, the ValueRep::reg() constraint will ensure that as far as the snippet knows, the tag registers will already have the tags and not anything else.

The scratch register is the only issue.  We currently have no way of requesting scratch registers from B3 patchpoints.  We should fix that!
Comment 2 Filip Pizlo 2016-01-04 15:01:59 PST
Created attachment 268239 [details]
the patch
Comment 3 WebKit Commit Bot 2016-01-04 15:04:37 PST
Attachment 268239 [details] did not pass style-queue:

ERROR: Source/JavaScriptCore/ftl/FTLLowerDFGToLLVM.cpp:7562:  Place brace on its own line for function definitions.  [whitespace/braces] [4]
ERROR: Source/JavaScriptCore/ftl/FTLLowerDFGToLLVM.cpp:7575:  Place brace on its own line for function definitions.  [whitespace/braces] [4]
Total errors found: 2 in 12 files

If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 4 Mark Lam 2016-01-04 15:07:53 PST
Comment on attachment 268239 [details]
the patch

Comment 5 Filip Pizlo 2016-01-04 15:09:02 PST
Landed in http://trac.webkit.org/changeset/194561