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

Side by Side Diff: vm/flow_graph_builder.h

Issue 10544206: Second step for computing SSA: renaming. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/runtime/
Patch Set: Created 8 years, 6 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
« no previous file with comments | « no previous file | vm/flow_graph_builder.cc » ('j') | vm/flow_graph_builder.cc » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_BUILDER_H_ 5 #ifndef VM_FLOW_GRAPH_BUILDER_H_
6 #define VM_FLOW_GRAPH_BUILDER_H_ 6 #define VM_FLOW_GRAPH_BUILDER_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 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 private: 45 private:
46 void ComputeDominators(GrowableArray<BlockEntryInstr*>* preorder, 46 void ComputeDominators(GrowableArray<BlockEntryInstr*>* preorder,
47 GrowableArray<intptr_t>* parent, 47 GrowableArray<intptr_t>* parent,
48 GrowableArray<BitVector*>* dominance_frontier); 48 GrowableArray<BitVector*>* dominance_frontier);
49 49
50 void CompressPath(intptr_t start_index, 50 void CompressPath(intptr_t start_index,
51 intptr_t current_index, 51 intptr_t current_index,
52 GrowableArray<intptr_t>* parent, 52 GrowableArray<intptr_t>* parent,
53 GrowableArray<intptr_t>* label); 53 GrowableArray<intptr_t>* label);
54 54
55 void Rename(intptr_t var_count);
56 void RenameRecursive(BlockEntryInstr* block_entry,
57 ZoneGrowableArray<Value*>* env,
58 intptr_t var_count);
srdjan 2012/06/18 18:04:38 SHould we move all the SSA building methods and fi
Florian Schneider 2012/06/19 11:26:40 Yes, I think that would be good. I'll do it as a s
59
55 void InsertPhis(const GrowableArray<BlockEntryInstr*>& preorder, 60 void InsertPhis(const GrowableArray<BlockEntryInstr*>& preorder,
56 const GrowableArray<BitVector*>& assigned_vars, 61 const GrowableArray<BitVector*>& assigned_vars,
57 const intptr_t var_count, 62 const intptr_t var_count,
58 const GrowableArray<BitVector*>& dom_frontier); 63 const GrowableArray<BitVector*>& dom_frontier);
59 64
60 const ParsedFunction& parsed_function_; 65 const ParsedFunction& parsed_function_;
61 GrowableArray<BlockEntryInstr*> preorder_block_entries_; 66 GrowableArray<BlockEntryInstr*> preorder_block_entries_;
62 GrowableArray<BlockEntryInstr*> postorder_block_entries_; 67 GrowableArray<BlockEntryInstr*> postorder_block_entries_;
63 intptr_t context_level_; 68 intptr_t context_level_;
64 intptr_t last_used_try_index_; 69 intptr_t last_used_try_index_;
65 intptr_t try_index_; 70 intptr_t try_index_;
66 GraphEntryInstr* graph_entry_; 71 GraphEntryInstr* graph_entry_;
72 intptr_t current_ssa_temp_index_;
67 73
68 DISALLOW_IMPLICIT_CONSTRUCTORS(FlowGraphBuilder); 74 DISALLOW_IMPLICIT_CONSTRUCTORS(FlowGraphBuilder);
69 }; 75 };
70 76
71 77
72 class TestGraphVisitor; 78 class TestGraphVisitor;
73 79
74 // Translate an AstNode to a control-flow graph fragment for its effects 80 // Translate an AstNode to a control-flow graph fragment for its effects
75 // (e.g., a statement or an expression in an effect context). Implements a 81 // (e.g., a statement or an expression in an effect context). Implements a
76 // function from an AstNode and next temporary index to a graph fragment 82 // function from an AstNode and next temporary index to a graph fragment
(...skipping 238 matching lines...) Expand 10 before | Expand all | Expand 10 after
315 // Output parameters. 321 // Output parameters.
316 TargetEntryInstr** true_successor_address_; 322 TargetEntryInstr** true_successor_address_;
317 TargetEntryInstr** false_successor_address_; 323 TargetEntryInstr** false_successor_address_;
318 324
319 intptr_t condition_token_index_; 325 intptr_t condition_token_index_;
320 }; 326 };
321 327
322 } // namespace dart 328 } // namespace dart
323 329
324 #endif // VM_FLOW_GRAPH_BUILDER_H_ 330 #endif // VM_FLOW_GRAPH_BUILDER_H_
OLDNEW
« no previous file with comments | « no previous file | vm/flow_graph_builder.cc » ('j') | vm/flow_graph_builder.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698