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

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

Issue 786273009: Refactor and simplify manual inlining in the flow graph optimizer. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 5 years, 11 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 | « no previous file | 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 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
74 flow_graph_->InsertBefore(next, instr, env, use_kind); 74 flow_graph_->InsertBefore(next, instr, env, use_kind);
75 } 75 }
76 76
77 private: 77 private:
78 // Attempt to build ICData for call using propagated class-ids. 78 // Attempt to build ICData for call using propagated class-ids.
79 bool TryCreateICData(InstanceCallInstr* call); 79 bool TryCreateICData(InstanceCallInstr* call);
80 const ICData& TrySpecializeICData(const ICData& ic_data, intptr_t cid); 80 const ICData& TrySpecializeICData(const ICData& ic_data, intptr_t cid);
81 81
82 void SpecializePolymorphicInstanceCall(PolymorphicInstanceCallInstr* call); 82 void SpecializePolymorphicInstanceCall(PolymorphicInstanceCallInstr* call);
83 83
84 bool TryReplaceWithStoreIndexed(InstanceCallInstr* call); 84 bool TryReplaceWithIndexedOp(InstanceCallInstr* call);
85 bool InlineSetIndexed(MethodRecognizer::Kind kind, 85 bool InlineSetIndexed(MethodRecognizer::Kind kind,
86 const Function& target, 86 const Function& target,
87 Instruction* call, 87 Instruction* call,
88 Definition* receiver, 88 Definition* receiver,
89 intptr_t token_pos, 89 intptr_t token_pos,
90 const ICData* ic_data,
91 const ICData& value_check, 90 const ICData& value_check,
92 TargetEntryInstr** entry, 91 TargetEntryInstr** entry,
93 Definition** last); 92 Definition** last);
94 bool TryReplaceWithLoadIndexed(InstanceCallInstr* call);
95 bool InlineGetIndexed(MethodRecognizer::Kind kind, 93 bool InlineGetIndexed(MethodRecognizer::Kind kind,
96 Instruction* call, 94 Instruction* call,
97 Definition* receiver, 95 Definition* receiver,
98 const ICData& ic_data,
99 TargetEntryInstr** entry, 96 TargetEntryInstr** entry,
100 Definition** last); 97 Definition** last);
101 intptr_t PrepareInlineIndexedOp(Instruction* call, 98 intptr_t PrepareInlineIndexedOp(Instruction* call,
102 intptr_t array_cid, 99 intptr_t array_cid,
103 Definition** array, 100 Definition** array,
104 Definition* index, 101 Definition* index,
105 Instruction** cursor); 102 Instruction** cursor);
106 103
107 104
108 bool TryReplaceWithBinaryOp(InstanceCallInstr* call, Token::Kind op_kind); 105 bool TryReplaceWithBinaryOp(InstanceCallInstr* call, Token::Kind op_kind);
(...skipping 318 matching lines...) Expand 10 before | Expand all | Expand 10 after
427 // Optimize spill stores inside try-blocks by identifying values that always 424 // Optimize spill stores inside try-blocks by identifying values that always
428 // contain a single known constant at catch block entry. 425 // contain a single known constant at catch block entry.
429 class TryCatchAnalyzer : public AllStatic { 426 class TryCatchAnalyzer : public AllStatic {
430 public: 427 public:
431 static void Optimize(FlowGraph* flow_graph); 428 static void Optimize(FlowGraph* flow_graph);
432 }; 429 };
433 430
434 } // namespace dart 431 } // namespace dart
435 432
436 #endif // VM_FLOW_GRAPH_OPTIMIZER_H_ 433 #endif // VM_FLOW_GRAPH_OPTIMIZER_H_
OLDNEW
« no previous file with comments | « no previous file | runtime/vm/flow_graph_optimizer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698