WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
151519
Use the JITAddGenerator snippet in the FTL.
https://bugs.webkit.org/show_bug.cgi?id=151519
Summary
Use the JITAddGenerator snippet in the FTL.
Mark Lam
Reported
2015-11-20 15:22:55 PST
Patch coming.
Attachments
patch 1.
(56.53 KB, patch)
2015-11-20 16:19 PST
,
Mark Lam
no flags
Details
Formatted Diff
Diff
patch 2: fixed valid style issues.
(56.53 KB, patch)
2015-11-20 16:29 PST
,
Mark Lam
no flags
Details
Formatted Diff
Diff
x86_64 benchmark result.
(64.65 KB, text/plain)
2015-11-26 09:40 PST
,
Mark Lam
no flags
Details
rebased patch.
(11.44 KB, patch)
2015-12-01 12:57 PST
,
Mark Lam
ggaren
: review+
Details
Formatted Diff
Diff
patch 4: plus 2 bug fixes.
(12.66 KB, patch)
2015-12-01 17:03 PST
,
Mark Lam
ggaren
: review+
Details
Formatted Diff
Diff
patch 5: preserve original compileValueAdd() when #if FTL_USES_B3.
(12.56 KB, patch)
2015-12-01 17:10 PST
,
Mark Lam
no flags
Details
Formatted Diff
Diff
patch 6: added back CRASH() for B3 in the same way that ArithSub does it.
(12.56 KB, patch)
2015-12-02 11:06 PST
,
Mark Lam
no flags
Details
Formatted Diff
Diff
patch 6: added back CRASH() for B3 in the same way that ArithSub does it (again).
(12.66 KB, patch)
2015-12-02 11:07 PST
,
Mark Lam
ggaren
: review+
Details
Formatted Diff
Diff
Show Obsolete
(6)
View All
Add attachment
proposed patch, testcase, etc.
Radar WebKit Bug Importer
Comment 1
2015-11-20 15:23:51 PST
<
rdar://problem/23637757
>
Mark Lam
Comment 2
2015-11-20 16:19:51 PST
Created
attachment 266012
[details]
patch 1. This patch passes the JSC tests on x86_64. Still need to benchmark it, test it on ARM64, and tune the IC size for the ValueAdd IC. Other than that, the code is in what I expect to be the final form. Feedback is welcomed. Thanks.
WebKit Commit Bot
Comment 3
2015-11-20 16:21:20 PST
Attachment 266012
[details]
did not pass style-queue: ERROR: Source/JavaScriptCore/ftl/FTLInlineCacheDescriptor.h:152: Wrong number of spaces before statement. (expected: 12) [whitespace/indent] [4] ERROR: Source/JavaScriptCore/ftl/FTLInlineCacheDescriptor.h:153: Wrong number of spaces before statement. (expected: 12) [whitespace/indent] [4] ERROR: Source/JavaScriptCore/ftl/FTLInlineCacheDescriptor.h:154: Wrong number of spaces before statement. (expected: 12) [whitespace/indent] [4] ERROR: Source/JavaScriptCore/ftl/FTLInlineCacheDescriptor.h:155: Wrong number of spaces before statement. (expected: 12) [whitespace/indent] [4] ERROR: Source/JavaScriptCore/ftl/FTLInlineCacheDescriptor.h:156: Wrong number of spaces before statement. (expected: 12) [whitespace/indent] [4] ERROR: Source/JavaScriptCore/ftl/FTLInlineCacheDescriptor.h:159: Wrong number of spaces before statement. (expected: 12) [whitespace/indent] [4] ERROR: Source/JavaScriptCore/ftl/FTLInlineCacheDescriptor.h:160: Wrong number of spaces before statement. (expected: 12) [whitespace/indent] [4] ERROR: Source/JavaScriptCore/ftl/FTLInlineCacheDescriptor.h:161: Wrong number of spaces before statement. (expected: 12) [whitespace/indent] [4] ERROR: Source/JavaScriptCore/ftl/FTLInlineCacheDescriptor.h:162: Wrong number of spaces before statement. (expected: 12) [whitespace/indent] [4] ERROR: Source/JavaScriptCore/ftl/FTLCompile.cpp:41: Alphabetical sorting problem. [build/include_order] [4] ERROR: Source/JavaScriptCore/ftl/FTLCompile.cpp:341: Missing space after , [whitespace/comma] [3] ERROR: Source/JavaScriptCore/ftl/FTLCompile.cpp:344: Missing space after , [whitespace/comma] [3] ERROR: Source/JavaScriptCore/ftl/FTLInlineCacheDescriptorInlines.h:33: Alphabetical sorting problem. [build/include_order] [4] ERROR: Source/JavaScriptCore/ftl/FTLInlineCacheDescriptorInlines.h:38: Do not use 'using namespace DFG;'. [build/using_namespace] [4] ERROR: Source/JavaScriptCore/ftl/FTLInlineCacheDescriptorInlines.h:41: Comma should be at the beginning of the line in a member initialization list. [whitespace/init] [4] ERROR: Source/JavaScriptCore/ftl/FTLInlineCacheDescriptorInlines.h:42: Weird number of spaces at line-start. Are you using a 4-space indent? [whitespace/indent] [3] ERROR: Source/JavaScriptCore/ftl/FTLInlineCacheDescriptorInlines.h:53: Wrong number of spaces before statement. (expected: 8) [whitespace/indent] [4] ERROR: Source/JavaScriptCore/ftl/FTLInlineCacheDescriptorInlines.h:53: Comma should be at the beginning of the line in a member initialization list. [whitespace/init] [4] ERROR: Source/JavaScriptCore/ftl/FTLCompileBinaryOp.cpp:193: Weird number of spaces at line-start. Are you using a 4-space indent? [whitespace/indent] [3] ERROR: Source/JavaScriptCore/ftl/FTLCompileBinaryOp.cpp:194: Weird number of spaces at line-start. Are you using a 4-space indent? [whitespace/indent] [3] Total errors found: 20 in 18 files If any of these errors are false positives, please file a bug against check-webkit-style.
Mark Lam
Comment 4
2015-11-20 16:29:10 PST
Created
attachment 266015
[details]
patch 2: fixed valid style issues.
WebKit Commit Bot
Comment 5
2015-11-20 16:30:32 PST
Attachment 266015
[details]
did not pass style-queue: ERROR: Source/JavaScriptCore/ftl/FTLInlineCacheDescriptor.h:152: Wrong number of spaces before statement. (expected: 12) [whitespace/indent] [4] ERROR: Source/JavaScriptCore/ftl/FTLInlineCacheDescriptor.h:153: Wrong number of spaces before statement. (expected: 12) [whitespace/indent] [4] ERROR: Source/JavaScriptCore/ftl/FTLInlineCacheDescriptor.h:154: Wrong number of spaces before statement. (expected: 12) [whitespace/indent] [4] ERROR: Source/JavaScriptCore/ftl/FTLInlineCacheDescriptor.h:155: Wrong number of spaces before statement. (expected: 12) [whitespace/indent] [4] ERROR: Source/JavaScriptCore/ftl/FTLInlineCacheDescriptor.h:156: Wrong number of spaces before statement. (expected: 12) [whitespace/indent] [4] ERROR: Source/JavaScriptCore/ftl/FTLInlineCacheDescriptor.h:159: Wrong number of spaces before statement. (expected: 12) [whitespace/indent] [4] ERROR: Source/JavaScriptCore/ftl/FTLInlineCacheDescriptor.h:160: Wrong number of spaces before statement. (expected: 12) [whitespace/indent] [4] ERROR: Source/JavaScriptCore/ftl/FTLInlineCacheDescriptor.h:161: Wrong number of spaces before statement. (expected: 12) [whitespace/indent] [4] ERROR: Source/JavaScriptCore/ftl/FTLInlineCacheDescriptor.h:162: Wrong number of spaces before statement. (expected: 12) [whitespace/indent] [4] ERROR: Source/JavaScriptCore/ftl/FTLInlineCacheDescriptorInlines.h:39: Comma should be at the beginning of the line in a member initialization list. [whitespace/init] [4] ERROR: Source/JavaScriptCore/ftl/FTLInlineCacheDescriptorInlines.h:51: Wrong number of spaces before statement. (expected: 8) [whitespace/indent] [4] ERROR: Source/JavaScriptCore/ftl/FTLInlineCacheDescriptorInlines.h:51: Comma should be at the beginning of the line in a member initialization list. [whitespace/init] [4] Total errors found: 12 in 18 files If any of these errors are false positives, please file a bug against check-webkit-style.
Mark Lam
Comment 6
2015-11-26 09:40:55 PST
Created
attachment 266189
[details]
x86_64 benchmark result. Benchmarks show that perf is neutral. Any of the "definitely" faster/slower results are just noise, and do not reproduce when I re-run them. I tried adding an ftl-object-add.js test to specifically test the effects of polymorphic operands on FTL add performance. The result was no significant change. This is because the FTL (and DFG) had already previously supported polymorphic adds (ValueAdd) with an unconditional call to its slow path function. This patch introduces the ability to handle numeric types without going to the slow path, which evidently does not contribute significant difference in perf. We should move forward with this patch anyway because: 1. it keeps the op_add implementation consistent with the other operators. 2. it introduces the common BinaryOpDescriptor which make it easier to add future binary operators (implemented as snippets) to the FTL.
Mark Lam
Comment 7
2015-12-01 10:21:41 PST
Comment on
attachment 266015
[details]
patch 2: fixed valid style issues. I need to rebase this patch in light of recent commits. I will also split this into 2 patches: 1 to refactor the FTL code for binary snippets (new bug), 1 for the FTL ValueAdd snippet (this bug).
Mark Lam
Comment 8
2015-12-01 12:57:39 PST
Created
attachment 266379
[details]
rebased patch. Still waiting for tests of IC sizes to finish running.
WebKit Commit Bot
Comment 9
2015-12-01 12:59:19 PST
Attachment 266379
[details]
did not pass style-queue: ERROR: Source/JavaScriptCore/ftl/FTLInlineCacheDescriptorInlines.h:52: Wrong number of spaces before statement. (expected: 8) [whitespace/indent] [4] ERROR: Source/JavaScriptCore/ftl/FTLInlineCacheDescriptorInlines.h:52: Comma should be at the beginning of the line in a member initialization list. [whitespace/init] [4] Total errors found: 2 in 9 files If any of these errors are false positives, please file a bug against check-webkit-style.
Geoffrey Garen
Comment 10
2015-12-01 13:13:31 PST
Comment on
attachment 266379
[details]
rebased patch. r=me
Mark Lam
Comment 11
2015-12-01 17:03:55 PST
Created
attachment 266414
[details]
patch 4: plus 2 bug fixes. Added 2 bug fixes: 1. In lower() in FTLLowerDFGToLLVM.cpp, I added the case for ValueAdd where it needs to account for a potential need of a spill location on the stack. 2. In compileValueAdd(), I moved the increment m_stackmapIDs a little lower in the function to the point where we are committed to allocated a new patchpoint.
WebKit Commit Bot
Comment 12
2015-12-01 17:05:28 PST
Attachment 266414
[details]
did not pass style-queue: ERROR: Source/JavaScriptCore/ftl/FTLInlineCacheDescriptorInlines.h:52: Wrong number of spaces before statement. (expected: 8) [whitespace/indent] [4] ERROR: Source/JavaScriptCore/ftl/FTLInlineCacheDescriptorInlines.h:52: Comma should be at the beginning of the line in a member initialization list. [whitespace/init] [4] Total errors found: 2 in 9 files If any of these errors are false positives, please file a bug against check-webkit-style.
Geoffrey Garen
Comment 13
2015-12-01 17:06:19 PST
Comment on
attachment 266414
[details]
patch 4: plus 2 bug fixes. r=me
Mark Lam
Comment 14
2015-12-01 17:10:52 PST
Created
attachment 266415
[details]
patch 5: preserve original compileValueAdd() when #if FTL_USES_B3.
WebKit Commit Bot
Comment 15
2015-12-01 17:12:08 PST
Attachment 266415
[details]
did not pass style-queue: ERROR: Source/JavaScriptCore/ftl/FTLInlineCacheDescriptorInlines.h:52: Wrong number of spaces before statement. (expected: 8) [whitespace/indent] [4] ERROR: Source/JavaScriptCore/ftl/FTLInlineCacheDescriptorInlines.h:52: Comma should be at the beginning of the line in a member initialization list. [whitespace/init] [4] Total errors found: 2 in 9 files If any of these errors are false positives, please file a bug against check-webkit-style.
Mark Lam
Comment 16
2015-12-02 11:06:06 PST
Created
attachment 266454
[details]
patch 6: added back CRASH() for B3 in the same way that ArithSub does it.
Mark Lam
Comment 17
2015-12-02 11:06:46 PST
Comment on
attachment 266454
[details]
patch 6: added back CRASH() for B3 in the same way that ArithSub does it. Wrong patch.
Mark Lam
Comment 18
2015-12-02 11:07:48 PST
Created
attachment 266455
[details]
patch 6: added back CRASH() for B3 in the same way that ArithSub does it (again).
WebKit Commit Bot
Comment 19
2015-12-02 11:10:14 PST
Attachment 266455
[details]
did not pass style-queue: ERROR: Source/JavaScriptCore/ftl/FTLInlineCacheDescriptorInlines.h:52: Wrong number of spaces before statement. (expected: 8) [whitespace/indent] [4] ERROR: Source/JavaScriptCore/ftl/FTLInlineCacheDescriptorInlines.h:52: Comma should be at the beginning of the line in a member initialization list. [whitespace/init] [4] Total errors found: 2 in 9 files If any of these errors are false positives, please file a bug against check-webkit-style.
Geoffrey Garen
Comment 20
2015-12-02 11:15:38 PST
Comment on
attachment 266455
[details]
patch 6: added back CRASH() for B3 in the same way that ArithSub does it (again). r=me
Mark Lam
Comment 21
2015-12-02 11:21:08 PST
Thanks for the review. Landed in
r192950
: <
http://trac.webkit.org/r192950
>.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug