WebKit Bugzilla
Attachment 361614 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-20190209153137.patch (text/plain), 2.44 KB, created by
Robin Morisset
on 2019-02-09 15:31:38 PST
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Robin Morisset
Created:
2019-02-09 15:31:38 PST
Size:
2.44 KB
patch
obsolete
>Subversion Revision: 241245 >diff --git a/Source/JavaScriptCore/ChangeLog b/Source/JavaScriptCore/ChangeLog >index c6fe0ea3d9f95608c27b23704db6f9eed2c124ae..90b81103f32e46a7ef0afe97f7b0e4ff9b94acf5 100644 >--- a/Source/JavaScriptCore/ChangeLog >+++ b/Source/JavaScriptCore/ChangeLog >@@ -1,3 +1,26 @@ >+2019-02-09 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 CFGa, CFGb and CFGc): >+ - CFGa makes any terminal that points to a block empty except for a jump point to that jump instead. >+ - CFGb transforms any branch or switch that point to a single block into a jump >+ - CFGc inlines any block with a single predecessor that ends in a jump into the end of that predecessor. >+ >+ It currently is limited in the following way: >+ - CFGa and CFGc can only fire once per block per iteration >+ - CFGb can create jumps that would trigger CFGa, 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-09 Darin Adler <darin@apple.com> > > Eliminate unnecessary String temporaries by using StringConcatenateNumbers >diff --git a/Source/JavaScriptCore/b3/B3ReduceStrength.cpp b/Source/JavaScriptCore/b3/B3ReduceStrength.cpp >index 7690b53de8d9f557f7118afdb0cad2e1a6a2ccbb..cea51443beb7c39b9eda727b5ba612728db0837c 100644 >--- a/Source/JavaScriptCore/b3/B3ReduceStrength.cpp >+++ b/Source/JavaScriptCore/b3/B3ReduceStrength.cpp >@@ -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