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

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

Issue 16430002: Ensure that all phis inserted by load optimizer have consistent representation. (Closed) Base URL: https://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 24 matching lines...) Expand all
35 // shift can be a truncating Smi shift-left and result is always Smi. 35 // shift can be a truncating Smi shift-left and result is always Smi.
36 void TryOptimizeLeftShiftWithBitAndPattern(); 36 void TryOptimizeLeftShiftWithBitAndPattern();
37 37
38 // Returns true if any instructions were canonicalized away. 38 // Returns true if any instructions were canonicalized away.
39 bool Canonicalize(); 39 bool Canonicalize();
40 40
41 void EliminateDeadPhis(); 41 void EliminateDeadPhis();
42 42
43 void SelectRepresentations(); 43 void SelectRepresentations();
44 44
45 void UnboxPhis();
46
45 void InferSmiRanges(); 47 void InferSmiRanges();
46 48
47 void AnalyzeTryCatch(); 49 void AnalyzeTryCatch();
48 50
49 // Remove environments from the instructions which do not deoptimize. 51 // Remove environments from the instructions which do not deoptimize.
50 void EliminateEnvironments(); 52 void EliminateEnvironments();
51 53
52 virtual void VisitStaticCall(StaticCallInstr* instr); 54 virtual void VisitStaticCall(StaticCallInstr* instr);
53 virtual void VisitInstanceCall(InstanceCallInstr* instr); 55 virtual void VisitInstanceCall(InstanceCallInstr* instr);
54 virtual void VisitRelationalOp(RelationalOpInstr* instr); 56 virtual void VisitRelationalOp(RelationalOpInstr* instr);
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
126 128
127 // Add a class check for a call's first argument immediately before the 129 // Add a class check for a call's first argument immediately before the
128 // call, using the call's IC data to determine the check, and the call's 130 // call, using the call's IC data to determine the check, and the call's
129 // deopt ID and deoptimization environment if the check fails. 131 // deopt ID and deoptimization environment if the check fails.
130 void AddReceiverCheck(InstanceCallInstr* call); 132 void AddReceiverCheck(InstanceCallInstr* call);
131 133
132 void ReplaceCall(Definition* call, Definition* replacement); 134 void ReplaceCall(Definition* call, Definition* replacement);
133 135
134 void InsertConversionsFor(Definition* def); 136 void InsertConversionsFor(Definition* def);
135 137
138 void ConvertUse(Value* use, Representation from);
139
136 void InsertConversion(Representation from, 140 void InsertConversion(Representation from,
137 Representation to, 141 Representation to,
138 Value* use, 142 Value* use,
139 Instruction* insert_before, 143 Instruction* insert_before,
140 Instruction* deopt_target); 144 Instruction* deopt_target);
141 145
142 bool InstanceCallNeedsClassCheck(InstanceCallInstr* call) const; 146 bool InstanceCallNeedsClassCheck(InstanceCallInstr* call) const;
143 bool MethodExtractorNeedsClassCheck(InstanceCallInstr* call) const; 147 bool MethodExtractorNeedsClassCheck(InstanceCallInstr* call) const;
144 148
145 bool InlineFloat32x4Getter(InstanceCallInstr* call, 149 bool InlineFloat32x4Getter(InstanceCallInstr* call,
(...skipping 217 matching lines...) Expand 10 before | Expand all | Expand 10 after
363 // Optimize spill stores inside try-blocks by identifying values that always 367 // Optimize spill stores inside try-blocks by identifying values that always
364 // contain a single known constant at catch block entry. 368 // contain a single known constant at catch block entry.
365 class TryCatchAnalyzer : public AllStatic { 369 class TryCatchAnalyzer : public AllStatic {
366 public: 370 public:
367 static void Optimize(FlowGraph* flow_graph); 371 static void Optimize(FlowGraph* flow_graph);
368 }; 372 };
369 373
370 } // namespace dart 374 } // namespace dart
371 375
372 #endif // VM_FLOW_GRAPH_OPTIMIZER_H_ 376 #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