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

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

Issue 10909094: Implement loop invariant code motion for check instructions. (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_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 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
113 virtual void VisitPhi(PhiInstr* phi); 113 virtual void VisitPhi(PhiInstr* phi);
114 virtual void VisitParameter(ParameterInstr* param); 114 virtual void VisitParameter(ParameterInstr* param);
115 virtual void VisitPushArgument(PushArgumentInstr* bind); 115 virtual void VisitPushArgument(PushArgumentInstr* bind);
116 116
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.
124 class LICM : public AllStatic {
125 public:
126 static void Optimize(FlowGraph* flow_graph);
127 };
128
129
123 // A simple common subexpression elimination based 130 // A simple common subexpression elimination based
124 // on the dominator tree. 131 // on the dominator tree.
125 class DominatorBasedCSE : public AllStatic { 132 class DominatorBasedCSE : public AllStatic {
126 public: 133 public:
127 static void Optimize(BlockEntryInstr* graph_entry); 134 static void Optimize(BlockEntryInstr* graph_entry);
128 135
129 private: 136 private:
130 static void OptimizeRecursive( 137 static void OptimizeRecursive(
131 BlockEntryInstr* entry, 138 BlockEntryInstr* entry,
132 DirectChainedHashMap<Definition*>* map); 139 DirectChainedHashMap<Definition*>* map);
133 }; 140 };
134 141
135 142
136 } // namespace dart 143 } // namespace dart
137 144
138 #endif // VM_FLOW_GRAPH_OPTIMIZER_H_ 145 #endif // VM_FLOW_GRAPH_OPTIMIZER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698