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

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

Issue 26191002: Hook ByteArrayViewLoad operations into polymorphic inliner (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 1 month 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 26 matching lines...) Expand all
37 bool Canonicalize(); 37 bool Canonicalize();
38 38
39 void EliminateDeadPhis(); 39 void EliminateDeadPhis();
40 40
41 void SelectRepresentations(); 41 void SelectRepresentations();
42 42
43 void InferSmiRanges(); 43 void InferSmiRanges();
44 44
45 void AnalyzeTryCatch(); 45 void AnalyzeTryCatch();
46 46
47 bool TryInlineRecognizedMethod(const Function& target, 47 bool TryInlineRecognizedMethod(intptr_t receiver_cid,
48 const Function& target,
48 Instruction* call, 49 Instruction* call,
49 intptr_t token_pos, 50 intptr_t token_pos,
50 const ICData& ic_data, 51 const ICData& ic_data,
51 TargetEntryInstr** entry, 52 TargetEntryInstr** entry,
52 Definition** last); 53 Definition** last);
53 54
54 // Remove environments from the instructions which do not deoptimize. 55 // Remove environments from the instructions which do not deoptimize.
55 void EliminateEnvironments(); 56 void EliminateEnvironments();
56 57
57 virtual void VisitStaticCall(StaticCallInstr* instr); 58 virtual void VisitStaticCall(StaticCallInstr* instr);
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
112 bool TryInlineFloat32x4Method(InstanceCallInstr* call, 113 bool TryInlineFloat32x4Method(InstanceCallInstr* call,
113 MethodRecognizer::Kind recognized_kind); 114 MethodRecognizer::Kind recognized_kind);
114 bool TryInlineUint32x4Method(InstanceCallInstr* call, 115 bool TryInlineUint32x4Method(InstanceCallInstr* call,
115 MethodRecognizer::Kind recognized_kind); 116 MethodRecognizer::Kind recognized_kind);
116 void ReplaceWithInstanceOf(InstanceCallInstr* instr); 117 void ReplaceWithInstanceOf(InstanceCallInstr* instr);
117 void ReplaceWithTypeCast(InstanceCallInstr* instr); 118 void ReplaceWithTypeCast(InstanceCallInstr* instr);
118 119
119 LoadIndexedInstr* BuildStringCodeUnitAt(InstanceCallInstr* call, 120 LoadIndexedInstr* BuildStringCodeUnitAt(InstanceCallInstr* call,
120 intptr_t cid); 121 intptr_t cid);
121 122
123 bool InlineByteArrayViewLoad(Instruction* call,
124 intptr_t array_cid,
125 intptr_t view_cid,
126 const ICData& ic_data,
127 TargetEntryInstr** entry,
128 Definition** last);
129
130 intptr_t PrepareInlineByteArrayViewOp(Instruction* call,
131 intptr_t array_cid,
132 intptr_t view_cid,
133 Definition** array,
134 Definition* index,
135 Instruction** cursor);
136
122 bool BuildByteArrayViewLoad(InstanceCallInstr* call, 137 bool BuildByteArrayViewLoad(InstanceCallInstr* call,
Cutch 2013/10/22 03:46:16 Minor cleanup here: Make signatures for BuildByteA
123 intptr_t receiver_cid,
124 intptr_t view_cid); 138 intptr_t view_cid);
125 bool BuildByteArrayViewStore(InstanceCallInstr* call, 139 bool BuildByteArrayViewStore(InstanceCallInstr* call,
126 intptr_t view_cid); 140 intptr_t view_cid);
127 void PrepareByteArrayViewOp(InstanceCallInstr* call, 141 void PrepareByteArrayViewOp(InstanceCallInstr* call,
128 intptr_t receiver_cid, 142 intptr_t receiver_cid,
129 intptr_t view_cid, 143 intptr_t view_cid,
130 Definition** array); 144 Definition** array);
131 145
132 // Insert a check of 'to_check' determined by 'unary_checks'. If the 146 // Insert a check of 'to_check' determined by 'unary_checks'. If the
133 // check fails it will deoptimize to 'deopt_id' using the deoptimization 147 // check fails it will deoptimize to 'deopt_id' using the deoptimization
(...skipping 248 matching lines...) Expand 10 before | Expand all | Expand 10 after
382 // Optimize spill stores inside try-blocks by identifying values that always 396 // Optimize spill stores inside try-blocks by identifying values that always
383 // contain a single known constant at catch block entry. 397 // contain a single known constant at catch block entry.
384 class TryCatchAnalyzer : public AllStatic { 398 class TryCatchAnalyzer : public AllStatic {
385 public: 399 public:
386 static void Optimize(FlowGraph* flow_graph); 400 static void Optimize(FlowGraph* flow_graph);
387 }; 401 };
388 402
389 } // namespace dart 403 } // namespace dart
390 404
391 #endif // VM_FLOW_GRAPH_OPTIMIZER_H_ 405 #endif // VM_FLOW_GRAPH_OPTIMIZER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698