WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
150961
B3 should have CSE
https://bugs.webkit.org/show_bug.cgi?id=150961
Summary
B3 should have CSE
Filip Pizlo
Reported
2015-11-05 15:12:58 PST
Fun!
Attachments
the patch
(6.45 KB, patch)
2015-12-11 13:23 PST
,
Filip Pizlo
benjamin
: review+
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Filip Pizlo
Comment 1
2015-12-11 13:23:04 PST
Created
attachment 267183
[details]
the patch
WebKit Commit Bot
Comment 2
2015-12-11 13:25:20 PST
Attachment 267183
[details]
did not pass style-queue: ERROR: Source/JavaScriptCore/b3/B3ReduceStrength.cpp:41: Alphabetical sorting problem. [build/include_order] [4] Total errors found: 1 in 4 files If any of these errors are false positives, please file a bug against check-webkit-style.
Benjamin Poulain
Comment 3
2015-12-11 15:00:27 PST
Comment on
attachment 267183
[details]
the patch View in context:
https://bugs.webkit.org/attachment.cgi?id=267183&action=review
> Source/JavaScriptCore/b3/B3ReduceStrength.cpp:112 > + m_dominators = &m_proc.dominators(); // Recompute if necessary.
This is a tiny bit scary :)
> Source/JavaScriptCore/b3/B3Value.cpp:448 > + case BitwiseCast:
Oops
Filip Pizlo
Comment 4
2015-12-11 15:02:53 PST
(In reply to
comment #3
)
> Comment on
attachment 267183
[details]
> the patch > > View in context: >
https://bugs.webkit.org/attachment.cgi?id=267183&action=review
> > > Source/JavaScriptCore/b3/B3ReduceStrength.cpp:112 > > + m_dominators = &m_proc.dominators(); // Recompute if necessary. > > This is a tiny bit scary :) > > > Source/JavaScriptCore/b3/B3Value.cpp:448 > > + case BitwiseCast: > > Oops
Why oops? BitwiseCast is a pure value, and so should have a value key.
Filip Pizlo
Comment 5
2015-12-11 15:16:58 PST
(In reply to
comment #4
)
> (In reply to
comment #3
) > > Comment on
attachment 267183
[details]
> > the patch > > > > View in context: > >
https://bugs.webkit.org/attachment.cgi?id=267183&action=review
> > > > > Source/JavaScriptCore/b3/B3ReduceStrength.cpp:112 > > > + m_dominators = &m_proc.dominators(); // Recompute if necessary. > > > > This is a tiny bit scary :) > > > > > Source/JavaScriptCore/b3/B3Value.cpp:448 > > > + case BitwiseCast: > > > > Oops > > Why oops? BitwiseCast is a pure value, and so should have a value key.
Never mind. :-)
Filip Pizlo
Comment 6
2015-12-11 15:19:00 PST
(In reply to
comment #3
)
> Comment on
attachment 267183
[details]
> the patch > > View in context: >
https://bugs.webkit.org/attachment.cgi?id=267183&action=review
> > > Source/JavaScriptCore/b3/B3ReduceStrength.cpp:112 > > + m_dominators = &m_proc.dominators(); // Recompute if necessary. > > This is a tiny bit scary :)
What is scary about it? The cost? It's true that CSE adds cost to reduceStrength. About half of that cost is dominators. Interestingly, this code doesn't need a dominator tree; it only wants dominance queries. For most CFGs, computing dominance using the data flow fixpoint is cheaper than the Lengauer-Tarjan algorithm that we use, so long as you just want dominance queries and not the tree. So, we could reduce that cost if we felt that we needed to. But half of the cost of the CSE is just the HashMap, of course. ;-)
> > > Source/JavaScriptCore/b3/B3Value.cpp:448 > > + case BitwiseCast: > > Oops
Filip Pizlo
Comment 7
2015-12-11 15:21:07 PST
Landed in
http://trac.webkit.org/changeset/193987
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