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

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, 2 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 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 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
111 bool TryInlineFloat32x4Method(InstanceCallInstr* call, 112 bool TryInlineFloat32x4Method(InstanceCallInstr* call,
112 MethodRecognizer::Kind recognized_kind); 113 MethodRecognizer::Kind recognized_kind);
113 bool TryInlineUint32x4Method(InstanceCallInstr* call, 114 bool TryInlineUint32x4Method(InstanceCallInstr* call,
114 MethodRecognizer::Kind recognized_kind); 115 MethodRecognizer::Kind recognized_kind);
115 void ReplaceWithInstanceOf(InstanceCallInstr* instr); 116 void ReplaceWithInstanceOf(InstanceCallInstr* instr);
116 void ReplaceWithTypeCast(InstanceCallInstr* instr); 117 void ReplaceWithTypeCast(InstanceCallInstr* instr);
117 118
118 LoadIndexedInstr* BuildStringCodeUnitAt(InstanceCallInstr* call, 119 LoadIndexedInstr* BuildStringCodeUnitAt(InstanceCallInstr* call,
119 intptr_t cid); 120 intptr_t cid);
120 121
122 bool InlineByteArrayViewLoad(Instruction* call,
123 intptr_t array_cid,
124 intptr_t view_cid,
125 const ICData& ic_data,
126 TargetEntryInstr** entry,
127 Definition** last);
128
129 intptr_t PrepareInlineByteArrayViewOp(Instruction* call,
130 intptr_t array_cid,
131 intptr_t view_cid,
132 Definition** array,
133 Definition* index,
134 Instruction** cursor);
135
121 bool BuildByteArrayViewLoad(InstanceCallInstr* call, 136 bool BuildByteArrayViewLoad(InstanceCallInstr* call,
122 intptr_t receiver_cid,
123 intptr_t view_cid); 137 intptr_t view_cid);
124 bool BuildByteArrayViewStore(InstanceCallInstr* call, 138 bool BuildByteArrayViewStore(InstanceCallInstr* call,
125 intptr_t view_cid); 139 intptr_t view_cid);
126 void PrepareByteArrayViewOp(InstanceCallInstr* call, 140 void PrepareByteArrayViewOp(InstanceCallInstr* call,
127 intptr_t receiver_cid, 141 intptr_t receiver_cid,
128 intptr_t view_cid, 142 intptr_t view_cid,
129 Definition** array); 143 Definition** array);
130 144
131 // Insert a check of 'to_check' determined by 'unary_checks'. If the 145 // Insert a check of 'to_check' determined by 'unary_checks'. If the
132 // check fails it will deoptimize to 'deopt_id' using the deoptimization 146 // check fails it will deoptimize to 'deopt_id' using the deoptimization
(...skipping 248 matching lines...) Expand 10 before | Expand all | Expand 10 after
381 // Optimize spill stores inside try-blocks by identifying values that always 395 // Optimize spill stores inside try-blocks by identifying values that always
382 // contain a single known constant at catch block entry. 396 // contain a single known constant at catch block entry.
383 class TryCatchAnalyzer : public AllStatic { 397 class TryCatchAnalyzer : public AllStatic {
384 public: 398 public:
385 static void Optimize(FlowGraph* flow_graph); 399 static void Optimize(FlowGraph* flow_graph);
386 }; 400 };
387 401
388 } // namespace dart 402 } // namespace dart
389 403
390 #endif // VM_FLOW_GRAPH_OPTIMIZER_H_ 404 #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