Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1741)

Side by Side Diff: runtime/vm/flow_graph_optimizer.h

Issue 14057004: Convert diamond shaped control flow into a single conditional instruction. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: address Florian's comments Created 7 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #ifndef VM_FLOW_GRAPH_OPTIMIZER_H_ 5 #ifndef VM_FLOW_GRAPH_OPTIMIZER_H_
6 #define VM_FLOW_GRAPH_OPTIMIZER_H_ 6 #define VM_FLOW_GRAPH_OPTIMIZER_H_
7 7
8 #include "vm/intermediate_language.h" 8 #include "vm/intermediate_language.h"
9 #include "vm/flow_graph.h" 9 #include "vm/flow_graph.h"
10 10
(...skipping 286 matching lines...) Expand 10 before | Expand all | Expand 10 after
297 ConstantInstr* constant); 297 ConstantInstr* constant);
298 298
299 // Duplicate a branch while replacing its comparison's left and right 299 // Duplicate a branch while replacing its comparison's left and right
300 // inputs. 300 // inputs.
301 static BranchInstr* CloneBranch(BranchInstr* branch, 301 static BranchInstr* CloneBranch(BranchInstr* branch,
302 Value* left, 302 Value* left,
303 Value* right); 303 Value* right);
304 }; 304 };
305 305
306 306
307 // Rewrite diamond control flow patterns that materialize values to use more
308 // efficient branchless code patterns if such are supported on the current
309 // platform.
310 class IfConverter : public AllStatic {
311 public:
312 static void Simplify(FlowGraph* flow_graph);
313 };
314
315
307 } // namespace dart 316 } // namespace dart
308 317
309 #endif // VM_FLOW_GRAPH_OPTIMIZER_H_ 318 #endif // VM_FLOW_GRAPH_OPTIMIZER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698