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

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

Issue 16844011: Revert r23330 and r23136 because of a bug with loop invariant code motion. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 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 | « runtime/vm/flow_graph_inliner.cc ('k') | runtime/vm/flow_graph_optimizer.cc » ('j') | no next file with comments »
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 184 matching lines...) Expand 10 before | Expand all | Expand 10 after
195 // Loop invariant code motion. 195 // Loop invariant code motion.
196 class LICM : public ValueObject { 196 class LICM : public ValueObject {
197 public: 197 public:
198 explicit LICM(FlowGraph* flow_graph); 198 explicit LICM(FlowGraph* flow_graph);
199 199
200 void Optimize(); 200 void Optimize();
201 201
202 private: 202 private:
203 FlowGraph* flow_graph() const { return flow_graph_; } 203 FlowGraph* flow_graph() const { return flow_graph_; }
204 204
205 bool MayHoist(Instruction* instr, BlockEntryInstr* pre_header);
206
207 void Hoist(ForwardInstructionIterator* it, 205 void Hoist(ForwardInstructionIterator* it,
208 BlockEntryInstr* pre_header, 206 BlockEntryInstr* pre_header,
209 Instruction* current); 207 Instruction* current);
210 208
211 void TryHoistCheckSmiThroughPhi(ForwardInstructionIterator* it, 209 void TryHoistCheckSmiThroughPhi(ForwardInstructionIterator* it,
212 BlockEntryInstr* header, 210 BlockEntryInstr* header,
213 BlockEntryInstr* pre_header, 211 BlockEntryInstr* pre_header,
214 CheckSmiInstr* current); 212 CheckSmiInstr* current);
215 213
216 FlowGraph* const flow_graph_; 214 FlowGraph* const flow_graph_;
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after
365 // Optimize spill stores inside try-blocks by identifying values that always 363 // Optimize spill stores inside try-blocks by identifying values that always
366 // contain a single known constant at catch block entry. 364 // contain a single known constant at catch block entry.
367 class TryCatchAnalyzer : public AllStatic { 365 class TryCatchAnalyzer : public AllStatic {
368 public: 366 public:
369 static void Optimize(FlowGraph* flow_graph); 367 static void Optimize(FlowGraph* flow_graph);
370 }; 368 };
371 369
372 } // namespace dart 370 } // namespace dart
373 371
374 #endif // VM_FLOW_GRAPH_OPTIMIZER_H_ 372 #endif // VM_FLOW_GRAPH_OPTIMIZER_H_
OLDNEW
« no previous file with comments | « runtime/vm/flow_graph_inliner.cc ('k') | runtime/vm/flow_graph_optimizer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698