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

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

Issue 23549020: Optimize conditional branches that have same true/false targets. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 3 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) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, 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_INTERMEDIATE_LANGUAGE_H_ 5 #ifndef VM_INTERMEDIATE_LANGUAGE_H_
6 #define VM_INTERMEDIATE_LANGUAGE_H_ 6 #define VM_INTERMEDIATE_LANGUAGE_H_
7 7
8 #include "vm/allocation.h" 8 #include "vm/allocation.h"
9 #include "vm/ast.h" 9 #include "vm/ast.h"
10 #include "vm/growable_array.h" 10 #include "vm/growable_array.h"
(...skipping 1215 matching lines...) Expand 10 before | Expand all | Expand 10 after
1226 return const_cast<BlockEntryInstr*>(this); 1226 return const_cast<BlockEntryInstr*>(this);
1227 } 1227 }
1228 1228
1229 // Helper to mutate the graph during inlining. This block should be 1229 // Helper to mutate the graph during inlining. This block should be
1230 // replaced with new_block as a predecessor of all of this block's 1230 // replaced with new_block as a predecessor of all of this block's
1231 // successors. 1231 // successors.
1232 void ReplaceAsPredecessorWith(BlockEntryInstr* new_block); 1232 void ReplaceAsPredecessorWith(BlockEntryInstr* new_block);
1233 1233
1234 void set_block_id(intptr_t block_id) { block_id_ = block_id; } 1234 void set_block_id(intptr_t block_id) { block_id_ = block_id; }
1235 1235
1236 // For all instruction in this block: Remove all inputs (including in the
1237 // environment) from their definition's use lists for all instructions.
1238 void UnuseAllInstructions();
1239
1236 protected: 1240 protected:
1237 BlockEntryInstr(intptr_t block_id, intptr_t try_index) 1241 BlockEntryInstr(intptr_t block_id, intptr_t try_index)
1238 : block_id_(block_id), 1242 : block_id_(block_id),
1239 try_index_(try_index), 1243 try_index_(try_index),
1240 preorder_number_(-1), 1244 preorder_number_(-1),
1241 postorder_number_(-1), 1245 postorder_number_(-1),
1242 dominator_(NULL), 1246 dominator_(NULL),
1243 dominated_blocks_(1), 1247 dominated_blocks_(1),
1244 last_instruction_(NULL), 1248 last_instruction_(NULL),
1245 parallel_move_(NULL), 1249 parallel_move_(NULL),
(...skipping 5538 matching lines...) Expand 10 before | Expand all | Expand 10 after
6784 ForwardInstructionIterator* current_iterator_; 6788 ForwardInstructionIterator* current_iterator_;
6785 6789
6786 private: 6790 private:
6787 DISALLOW_COPY_AND_ASSIGN(FlowGraphVisitor); 6791 DISALLOW_COPY_AND_ASSIGN(FlowGraphVisitor);
6788 }; 6792 };
6789 6793
6790 6794
6791 } // namespace dart 6795 } // namespace dart
6792 6796
6793 #endif // VM_INTERMEDIATE_LANGUAGE_H_ 6797 #endif // VM_INTERMEDIATE_LANGUAGE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698