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

Unified Diff: runtime/vm/flow_graph_optimizer.h

Issue 1149713002: With --noopt run unoptimized code through optimizer, more optimizations can be done later. (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: m Created 5 years, 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « runtime/vm/flow_graph_inliner.cc ('k') | runtime/vm/flow_graph_optimizer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/flow_graph_optimizer.h
diff --git a/runtime/vm/flow_graph_optimizer.h b/runtime/vm/flow_graph_optimizer.h
index ba3c4d8e2bd6cee8e54f0be2ca663cf86b3155b4..92b6042611583a3e2a6dea9d1a903feeac2498c6 100644
--- a/runtime/vm/flow_graph_optimizer.h
+++ b/runtime/vm/flow_graph_optimizer.h
@@ -23,6 +23,10 @@ class FlowGraphOptimizer : public FlowGraphVisitor {
FlowGraph* flow_graph() const { return flow_graph_; }
+ // Add ICData to InstanceCalls, so that optimizations can be run on them.
+ // TODO(srdjan): StaticCals as well?
+ void PopulateWithICData();
+
// Use ICData to optimize, replace or eliminate instructions.
void ApplyICData();
@@ -108,7 +112,8 @@ class FlowGraphOptimizer : public FlowGraphVisitor {
bool TryReplaceWithEqualityOp(InstanceCallInstr* call, Token::Kind op_kind);
bool TryReplaceWithRelationalOp(InstanceCallInstr* call, Token::Kind op_kind);
- bool TryInlineInstanceGetter(InstanceCallInstr* call);
+ bool TryInlineInstanceGetter(InstanceCallInstr* call,
+ bool allow_check = true);
bool TryInlineInstanceSetter(InstanceCallInstr* call,
const ICData& unary_ic_data);
@@ -233,7 +238,7 @@ class FlowGraphOptimizer : public FlowGraphVisitor {
Token::Kind op_kind);
bool InlineFloat64x2BinaryOp(InstanceCallInstr* call,
Token::Kind op_kind);
- void InlineImplicitInstanceGetter(InstanceCallInstr* call);
+ bool InlineImplicitInstanceGetter(InstanceCallInstr* call, bool allow_check);
RawBool* InstanceOfAsBool(const ICData& ic_data,
const AbstractType& type,
@@ -257,6 +262,8 @@ class FlowGraphOptimizer : public FlowGraphVisitor {
Isolate* isolate() const { return flow_graph_->isolate(); }
Zone* zone() const { return flow_graph_->zone(); }
+ const Function& function() const { return flow_graph_->function(); }
+
FlowGraph* flow_graph_;
DISALLOW_COPY_AND_ASSIGN(FlowGraphOptimizer);
« 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