WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
NEW
164536
We could strength reduce Spread(ArrayUse:@child) if its only consumer is NewArrayWithSpread
https://bugs.webkit.org/show_bug.cgi?id=164536
Summary
We could strength reduce Spread(ArrayUse:@child) if its only consumer is NewA...
Saam Barati
Reported
2016-11-08 16:57:47 PST
Right now, we are basically doing an extra memcpy into a JSFixedArray, however, if we know that NewArrayWithSpread is the only consumer of a Spread, we could get rid of the spread, and have the NewArrayWithSpread just consume the array itself. NewArrayWithSpread is likely to be the only consumer of the node since that's how we emit bytecode. If we write CSE rules in the future for Spread, this may not be the case, but it's likely a good optimization to eliminate the Spread node here and just have NewArrayWithSpread understand how to read the values out of a JS array. For example: ``` a: ... b: Spread(ArrayUse:@a) c: NewArrayWithSpread(KnownCellUse:@b) ``` could be transformed into: ``` a: ... c: NewArrayWithSpread(ArrayUse:@a) ```
Attachments
Add attachment
proposed patch, testcase, etc.
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