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

Unified Diff: runtime/vm/intermediate_language_mips.cc

Issue 18111006: Collect edge count profiling data and reorder basic blocks. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Incorporated review comments. Created 7 years, 4 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/intermediate_language_ia32.cc ('k') | runtime/vm/intermediate_language_x64.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/intermediate_language_mips.cc
diff --git a/runtime/vm/intermediate_language_mips.cc b/runtime/vm/intermediate_language_mips.cc
index 77d542eb8422013358c1ee586259631667fca46d..3d2f33861449362c830992484b512fe362400c37 100644
--- a/runtime/vm/intermediate_language_mips.cc
+++ b/runtime/vm/intermediate_language_mips.cc
@@ -3848,6 +3848,32 @@ void ReThrowInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
}
+void TargetEntryInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
+ __ Bind(compiler->GetJumpLabel(this));
+ if (!compiler->is_optimizing()) {
+ compiler->AddCurrentDescriptor(PcDescriptors::kDeopt,
+ deopt_id_,
+ Scanner::kDummyTokenIndex);
+ // Add an edge counter.
+ const Array& counter = Array::ZoneHandle(Array::New(1, Heap::kOld));
+ counter.SetAt(0, Smi::Handle(Smi::New(0)));
+ Label done;
+ __ Comment("Edge counter");
+ __ LoadObject(T0, counter);
+ __ lw(T1, FieldAddress(T0, Array::element_offset(0)));
+ __ AddImmediateDetectOverflow(T1, T1, Smi::RawValue(1), CMPRES, T2);
+ __ bgez(CMPRES, &done);
+ __ delay_slot()->sw(T1, FieldAddress(T0, Array::element_offset(0)));
+ __ LoadImmediate(TMP1, Smi::RawValue(Smi::kMaxValue));
+ __ sw(TMP1, FieldAddress(T0, Array::element_offset(0))); // If overflow.
+ __ Bind(&done);
+ }
+ if (HasParallelMove()) {
+ compiler->parallel_move_resolver()->EmitNativeCode(parallel_move());
+ }
+}
+
+
LocationSummary* GotoInstr::MakeLocationSummary() const {
return new LocationSummary(0, 0, LocationSummary::kNoCall);
}
« no previous file with comments | « runtime/vm/intermediate_language_ia32.cc ('k') | runtime/vm/intermediate_language_x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698