WebKit Bugzilla
Attachment 361691 Details for
Bug 194475
: B3ReduceStrength::simplifyCFG() could do a lot more on each iteration
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-194475-20190211102347.patch (text/plain), 2.35 KB, created by
Robin Morisset
on 2019-02-11 10:23:48 PST
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Robin Morisset
Created:
2019-02-11 10:23:48 PST
Size:
2.35 KB
patch
obsolete
>Index: Source/JavaScriptCore/ChangeLog >=================================================================== >--- Source/JavaScriptCore/ChangeLog (revision 241267) >+++ Source/JavaScriptCore/ChangeLog (working copy) >@@ -1,3 +1,26 @@ >+2019-02-11 Robin Morisset <rmorisset@apple.com> >+ >+ B3ReduceStrength::simplifyCFG() could do a lot more on each iteration >+ https://bugs.webkit.org/show_bug.cgi?id=194475 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ B3ReduceStrength::simplifyCFG() does three optimizations (which I will call A, B and C): >+ - A makes any terminal that points to a block that is empty except for a jump point to that jump's target instead. >+ - B transforms any branch or switch that points to a single block into a jump >+ - C finds blocks ending with jumps, whose successor has a single predecessor, and inline that successor block in place of the jump >+ >+ It currently is limited in the following way: >+ - A and C can only fire once per block per iteration >+ - B can create jumps that would trigger A, but they may not be seen until the next iteration >+ >+ Both problems are mitigated by going through the blocks in post-order, so that when a block is optimized most of its successors have already been optimized. >+ In a sense it is the symmetric of the peephole optimizer that goes in pre-order so that when an instruction is optimized most of its children have already been optimized. >+ >+ On JetStream2 it reduces the average number of iterations from 3.35 to 3.24. >+ >+ * b3/B3ReduceStrength.cpp: >+ > 2019-02-10 Mark Lam <mark.lam@apple.com> > > Remove the RELEASE_ASSERT check for duplicate cases in the BinarySwitch constructor. >Index: Source/JavaScriptCore/b3/B3ReduceStrength.cpp >=================================================================== >--- Source/JavaScriptCore/b3/B3ReduceStrength.cpp (revision 241267) >+++ Source/JavaScriptCore/b3/B3ReduceStrength.cpp (working copy) >@@ -2376,7 +2376,7 @@ private: > // predecessors during strength reduction since that minimizes the total number of fixpoint > // iterations needed to kill a lot of code. > >- for (BasicBlock* block : m_proc) { >+ for (BasicBlock* block : m_proc.blocksInPostOrder()) { > if (B3ReduceStrengthInternal::verbose) > dataLog("Considering block ", *block, ":\n"); >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 194475
:
361614
| 361691