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

Unified Diff: runtime/vm/intermediate_language.cc

Issue 1343383003: VM: Store edge counters in one per-function array. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: clean up comments, save space in IL Instruction class. Created 5 years, 3 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/intermediate_language.cc
diff --git a/runtime/vm/intermediate_language.cc b/runtime/vm/intermediate_language.cc
index b8db54da4961e5745f9fe3a68ae5a7f49e43fc06..6aef930922543d6b9a8b7ec1ce501c306f7cc9b3 100644
--- a/runtime/vm/intermediate_language.cc
+++ b/runtime/vm/intermediate_language.cc
@@ -974,6 +974,7 @@ bool BlockEntryInstr::DiscoverBlock(
last = it.Current();
}
set_last_instruction(last);
+ if (last->IsGoto()) last->AsGoto()->set_block(this);
return true;
}
@@ -2725,7 +2726,7 @@ void TargetEntryInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
__ Bind(compiler->GetJumpLabel(this));
if (!compiler->is_optimizing()) {
if (compiler->NeedsEdgeCounter(this)) {
- compiler->EmitEdgeCounter();
+ compiler->EmitEdgeCounter(preorder_number());
}
// The deoptimization descriptor points after the edge counter code for
// uniformity with ARM and MIPS, where we can reuse pattern matching

Powered by Google App Engine
This is Rietveld 408576698