WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
190932
Consider removing double load for accessing the instructions from LLInt
https://bugs.webkit.org/show_bug.cgi?id=190932
Summary
Consider removing double load for accessing the instructions from LLInt
Tadeu Zagallo
Reported
2018-10-25 16:34:55 PDT
https://bugs.webkit.org/show_bug.cgi?id=187373
changes CodeBlock::m_instructions from being an array of instructions to being a InstructionStream, which itself contains a Vector of instructions. Therefore, we need two loads to get to the actual Instruction*. The implementation was done this way to avoid copying the instructions once we finish writing to the stream after bytecode generation, but it might not be the best trade-off.
Attachments
Patch
(8.33 KB, patch)
2018-11-12 10:27 PST
,
Yusuke Suzuki
mark.lam
: review+
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Yusuke Suzuki
Comment 1
2018-11-12 10:27:35 PST
Created
attachment 354567
[details]
Patch
EWS Watchlist
Comment 2
2018-11-12 10:30:13 PST
Attachment 354567
[details]
did not pass style-queue: ERROR: Source/JavaScriptCore/bytecode/CodeBlock.cpp:373: Wrong number of spaces before statement. (expected: 8) [whitespace/indent] [4] Total errors found: 1 in 7 files If any of these errors are false positives, please file a bug against check-webkit-style.
Yusuke Suzuki
Comment 3
2018-11-15 17:56:35 PST
Ping?
Yusuke Suzuki
Comment 4
2018-11-18 22:09:04 PST
Ping?
Mark Lam
Comment 5
2018-11-18 22:18:49 PST
Comment on
attachment 354567
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=354567&action=review
> Source/JavaScriptCore/llint/LowLevelInterpreter32_64.asm:1818 > - muli sizeof SimpleJumpTable, t3 # FIXME: would be nice to peephole this! > + muli sizeof SimpleJumpTable, t3
What's the peephole opportunity the comment was talking about, and is it invalid / inappropriate? What is your reason for this change?
Yusuke Suzuki
Comment 6
2018-11-18 22:21:10 PST
Comment on
attachment 354567
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=354567&action=review
>> Source/JavaScriptCore/llint/LowLevelInterpreter32_64.asm:1818 >> + muli sizeof SimpleJumpTable, t3 > > What's the peephole opportunity the comment was talking about, and is it invalid / inappropriate? What is your reason for this change?
This removal is because we already did this optimization in
https://trac.webkit.org/changeset/237627/webkit
. This comment means that we can perform strength reduction to convert `muli` to `lshifti` if `sizeof SimpleJumpTable` is a power of two.
Mark Lam
Comment 7
2018-11-18 22:28:09 PST
Comment on
attachment 354567
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=354567&action=review
r=me.
>>> Source/JavaScriptCore/llint/LowLevelInterpreter32_64.asm:1818 >>> + muli sizeof SimpleJumpTable, t3 >> >> What's the peephole opportunity the comment was talking about, and is it invalid / inappropriate? What is your reason for this change? > > This removal is because we already did this optimization in
https://trac.webkit.org/changeset/237627/webkit
. > This comment means that we can perform strength reduction to convert `muli` to `lshifti` if `sizeof SimpleJumpTable` is a power of two.
OK, thanks.
Yusuke Suzuki
Comment 8
2018-11-18 22:51:59 PST
Committed
r238367
: <
https://trac.webkit.org/changeset/238367
>
Radar WebKit Bug Importer
Comment 9
2018-11-18 22:53:45 PST
<
rdar://problem/46161984
>
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