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

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

Issue 10916155: Optimistically hoist SmiCheck through phi when the only value of unknown type coming into the phi i… (Closed) Base URL: https://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
« no previous file with comments | « no previous file | runtime/vm/flow_graph_optimizer.cc » ('j') | runtime/vm/flow_graph_optimizer.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_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 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
117 const ParsedFunction& parsed_function_; 117 const ParsedFunction& parsed_function_;
118 bool still_changing_; 118 bool still_changing_;
119 DISALLOW_COPY_AND_ASSIGN(FlowGraphTypePropagator); 119 DISALLOW_COPY_AND_ASSIGN(FlowGraphTypePropagator);
120 }; 120 };
121 121
122 122
123 // Loop invariant code motion. 123 // Loop invariant code motion.
124 class LICM : public AllStatic { 124 class LICM : public AllStatic {
125 public: 125 public:
126 static void Optimize(FlowGraph* flow_graph); 126 static void Optimize(FlowGraph* flow_graph);
127
128 private:
129 static void Hoist(ForwardInstructionIterator* it,
130 BlockEntryInstr* pre_header,
131 Definition* current);
132
133 static void TryHoistCheckSmiThroughPhi(ForwardInstructionIterator* it,
134 BlockEntryInstr* header,
135 BlockEntryInstr* pre_header,
136 Definition* current);
127 }; 137 };
128 138
129 139
130 // A simple common subexpression elimination based 140 // A simple common subexpression elimination based
131 // on the dominator tree. 141 // on the dominator tree.
132 class DominatorBasedCSE : public AllStatic { 142 class DominatorBasedCSE : public AllStatic {
133 public: 143 public:
134 static void Optimize(BlockEntryInstr* graph_entry); 144 static void Optimize(BlockEntryInstr* graph_entry);
135 145
136 private: 146 private:
137 static void OptimizeRecursive( 147 static void OptimizeRecursive(
138 BlockEntryInstr* entry, 148 BlockEntryInstr* entry,
139 DirectChainedHashMap<Definition*>* map); 149 DirectChainedHashMap<Definition*>* map);
140 }; 150 };
141 151
142 152
143 } // namespace dart 153 } // namespace dart
144 154
145 #endif // VM_FLOW_GRAPH_OPTIMIZER_H_ 155 #endif // VM_FLOW_GRAPH_OPTIMIZER_H_
OLDNEW
« no previous file with comments | « no previous file | runtime/vm/flow_graph_optimizer.cc » ('j') | runtime/vm/flow_graph_optimizer.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698