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

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

Issue 10872035: Add a simple dominator based redundancy elimination. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 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) 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_H_ 5 #ifndef VM_FLOW_GRAPH_H_
6 #define VM_FLOW_GRAPH_H_ 6 #define VM_FLOW_GRAPH_H_
7 7
8 #include "vm/growable_array.h" 8 #include "vm/growable_array.h"
9 #include "vm/parser.h" 9 #include "vm/parser.h"
10 10
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 return postorder_; 49 return postorder_;
50 } 50 }
51 const GrowableArray<BlockEntryInstr*>& reverse_postorder() const { 51 const GrowableArray<BlockEntryInstr*>& reverse_postorder() const {
52 return reverse_postorder_; 52 return reverse_postorder_;
53 } 53 }
54 54
55 intptr_t max_virtual_register_number() const { 55 intptr_t max_virtual_register_number() const {
56 return current_ssa_temp_index(); 56 return current_ssa_temp_index();
57 } 57 }
58 58
59 GraphEntryInstr* graph_entry() const {
60 return graph_entry_;
61 }
62
59 // Operations on the flow graph. 63 // Operations on the flow graph.
60 void ComputeSSA(); 64 void ComputeSSA();
61 65
62 // TODO(zerny): Once the SSA is feature complete this should be removed. 66 // TODO(zerny): Once the SSA is feature complete this should be removed.
63 void Bailout(const char* reason) const; 67 void Bailout(const char* reason) const;
64 68
65 private: 69 private:
66 void DiscoverBlocks(); 70 void DiscoverBlocks();
67 71
68 // SSA transformation methods and fields. 72 // SSA transformation methods and fields.
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
107 const intptr_t stack_local_count_; 111 const intptr_t stack_local_count_;
108 GraphEntryInstr* graph_entry_; 112 GraphEntryInstr* graph_entry_;
109 GrowableArray<BlockEntryInstr*> preorder_; 113 GrowableArray<BlockEntryInstr*> preorder_;
110 GrowableArray<BlockEntryInstr*> postorder_; 114 GrowableArray<BlockEntryInstr*> postorder_;
111 GrowableArray<BlockEntryInstr*> reverse_postorder_; 115 GrowableArray<BlockEntryInstr*> reverse_postorder_;
112 }; 116 };
113 117
114 } // namespace dart 118 } // namespace dart
115 119
116 #endif // VM_FLOW_GRAPH_H_ 120 #endif // VM_FLOW_GRAPH_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698