WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
Bug 150478
Air should lay out code optimally
https://bugs.webkit.org/show_bug.cgi?id=150478
Summary
Air should lay out code optimally
Filip Pizlo
Reported
2015-10-22 16:03:39 PDT
Optimal code layout can be achieved by using a pre-order traversal that does not traverse Rare edges but instead saves them in a secondary rare worklist, followed by a second pre-order traversal that starts with that rare worklist and traverses all edges.
Attachments
the patch
(36.09 KB, patch)
2015-11-17 13:09 PST
,
Filip Pizlo
ggaren
: review+
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Filip Pizlo
Comment 1
2015-11-17 13:09:14 PST
Created
attachment 265700
[details]
the patch
WebKit Commit Bot
Comment 2
2015-11-17 13:10:48 PST
Attachment 265700
[details]
did not pass style-queue: ERROR: Source/JavaScriptCore/b3/air/AirOptimizeBlockOrder.cpp:58: Place brace on its own line for function definitions. [whitespace/braces] [4] ERROR: Source/JavaScriptCore/b3/air/AirOptimizeBlockOrder.cpp:141: Should have only a single space after a punctuation in a comment. [whitespace/comments] [5] Total errors found: 2 in 15 files If any of these errors are false positives, please file a bug against check-webkit-style.
Geoffrey Garen
Comment 3
2015-11-17 14:19:01 PST
Comment on
attachment 265700
[details]
the patch View in context:
https://bugs.webkit.org/attachment.cgi?id=265700&action=review
r=me
> Source/JavaScriptCore/ChangeLog:17 > + This also adds the requisite branch flipping, so that branches' taken successor is not the
a branch's taken successor
> Source/JavaScriptCore/b3/air/AirBasicBlock.h:54 > + // You shouldn't call this except when you know what you're doing.
Can you say something more specific here? This comment is true of all functions :).
> Source/JavaScriptCore/b3/air/AirOptimizeBlockOrder.cpp:90 > + for (FrequentedBlock& successor : block->successors()) {
I think I would like this more if the class were called "BlockWithFrequency". "Frequented blocks" sounds like a block that has a high frequency.
> Source/JavaScriptCore/b3/air/AirOptimizeBlockOrder.cpp:140 > + // forget about this phase, then at worse your new instructions won't opt into the inversion
at worst
Filip Pizlo
Comment 4
2015-11-17 14:27:28 PST
(In reply to
comment #3
)
> Comment on
attachment 265700
[details]
> the patch > > View in context: >
https://bugs.webkit.org/attachment.cgi?id=265700&action=review
> > r=me > > > Source/JavaScriptCore/ChangeLog:17 > > + This also adds the requisite branch flipping, so that branches' taken successor is not the > > a branch's taken successor > > > Source/JavaScriptCore/b3/air/AirBasicBlock.h:54 > > + // You shouldn't call this except when you know what you're doing. > > Can you say something more specific here? This comment is true of all > functions :). > > > Source/JavaScriptCore/b3/air/AirOptimizeBlockOrder.cpp:90 > > + for (FrequentedBlock& successor : block->successors()) { > > I think I would like this more if the class were called > "BlockWithFrequency". "Frequented blocks" sounds like a block that has a > high frequency. > > > Source/JavaScriptCore/b3/air/AirOptimizeBlockOrder.cpp:140 > > + // forget about this phase, then at worse your new instructions won't opt into the inversion > > at worst
Fixed everything but the name of FrequentedBlock. I agree there is probably a better name. That would be a sizeable patch, so it should probably be done separately. I'm not sure how urgent that is.
Filip Pizlo
Comment 5
2015-11-17 14:30:13 PST
Landed in
http://trac.webkit.org/changeset/192539
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