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

Unified Diff: runtime/vm/flow_graph_compiler.cc

Issue 1410733006: More general CHA-based inlining and devirtualization for precompiled code. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 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 side-by-side diff with in-line comments
Download patch
Index: runtime/vm/flow_graph_compiler.cc
diff --git a/runtime/vm/flow_graph_compiler.cc b/runtime/vm/flow_graph_compiler.cc
index 433d91ae94a656f2642f0011dcfeaf35e740c04a..e3b7ad6d6ae4cf7db50cfbdac6348b1eb5bf9509 100644
--- a/runtime/vm/flow_graph_compiler.cc
+++ b/runtime/vm/flow_graph_compiler.cc
@@ -252,7 +252,8 @@ void FlowGraphCompiler::InitCompiler() {
if (current->IsInstanceCall()) {
ic_data = current->AsInstanceCall()->ic_data();
}
- if ((ic_data != NULL) && (ic_data->NumberOfUsedChecks() == 0)) {
+ if ((ic_data == NULL) ||
+ ((ic_data != NULL) && (ic_data->NumberOfUsedChecks() == 0))) {
srdjan 2015/10/21 17:37:46 When do you see ic_data NULL, except for precompil
Florian Schneider 2015/10/22 13:59:25 Same here. Defensive left over check.
may_reoptimize_ = true;
rmacnak 2015/10/21 18:00:30 Can we rename this to has_ic_calls_ or, probably b
Florian Schneider 2015/10/22 13:59:25 may_reoptimize_ has no effect with precompilation
}
if (is_leaf &&
@@ -1097,9 +1098,7 @@ void FlowGraphCompiler::GenerateInstanceCall(
if (is_optimizing() && (ic_data.NumberOfUsedChecks() == 0)) {
// Emit IC call that will count and thus may need reoptimization at
// function entry.
- ASSERT(!is_optimizing()
- || may_reoptimize()
- || flow_graph().IsCompiledForOsr());
+ ASSERT(may_reoptimize() || flow_graph().IsCompiledForOsr());
switch (ic_data.NumArgsTested()) {
case 1:
EmitOptimizedInstanceCall(

Powered by Google App Engine
This is Rietveld 408576698