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

Unified Diff: runtime/vm/intermediate_language.cc

Issue 1992963002: Enable optimizer pipeline for DBC. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 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/intermediate_language.h ('k') | runtime/vm/intermediate_language_dbc.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/intermediate_language.cc
diff --git a/runtime/vm/intermediate_language.cc b/runtime/vm/intermediate_language.cc
index 66abf754d28d3cf98448c14da174d22f91bc6f49..4704219e55303d585104b9f0a3d9b964f0f0a7c6 100644
--- a/runtime/vm/intermediate_language.cc
+++ b/runtime/vm/intermediate_language.cc
@@ -3110,6 +3110,8 @@ void InstanceCallInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
}
}
#else
+ call_ic_data = &ICData::ZoneHandle(call_ic_data->Original());
+
// Emit smi fast path instruction. If fast-path succeeds it skips the next
// instruction otherwise it falls through.
if (function_name().raw() == Symbols::Plus().raw()) {
@@ -3131,13 +3133,18 @@ void InstanceCallInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
const intptr_t call_ic_data_kidx = __ AddConstant(*call_ic_data);
switch (call_ic_data->NumArgsTested()) {
case 1:
- __ InstanceCall(ArgumentCount(), call_ic_data_kidx);
+ if (compiler->is_optimizing()) {
+ __ InstanceCall1Opt(ArgumentCount(), call_ic_data_kidx);
+ } else {
+ __ InstanceCall1(ArgumentCount(), call_ic_data_kidx);
+ }
break;
case 2:
- __ InstanceCall2(ArgumentCount(), call_ic_data_kidx);
- break;
- case 3:
- __ InstanceCall3(ArgumentCount(), call_ic_data_kidx);
+ if (compiler->is_optimizing()) {
+ __ InstanceCall2Opt(ArgumentCount(), call_ic_data_kidx);
+ } else {
+ __ InstanceCall2(ArgumentCount(), call_ic_data_kidx);
+ }
break;
default:
UNIMPLEMENTED();
@@ -3146,6 +3153,11 @@ void InstanceCallInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
compiler->AddCurrentDescriptor(RawPcDescriptors::kIcCall,
deopt_id(),
token_pos());
+ compiler->RecordAfterCall(this);
+
+ if (compiler->is_optimizing()) {
+ __ PopLocal(locs()->out(0).reg());
+ }
#endif // !defined(TARGET_ARCH_DBC)
}
@@ -3252,6 +3264,12 @@ void StaticCallInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
compiler->AddCurrentDescriptor(RawPcDescriptors::kUnoptStaticCall,
deopt_id(),
token_pos());
+
+ compiler->RecordAfterCall(this);
+
+ if (compiler->is_optimizing()) {
+ __ PopLocal(locs()->out(0).reg());
+ }
#endif // !defined(TARGET_ARCH_DBC)
}
@@ -3266,7 +3284,10 @@ void AssertAssignableInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
// DBC does not use LocationSummaries in the same way as other architectures.
#if !defined(TARGET_ARCH_DBC)
ASSERT(locs()->in(0).reg() == locs()->out(0).reg());
-#endif
+#else
+ ASSERT(!compiler->is_optimizing() ||
+ (locs()->in(0).reg() == locs()->out(0).reg()));
+#endif // !defined(TARGET_ARCH_DBC)
}
« no previous file with comments | « runtime/vm/intermediate_language.h ('k') | runtime/vm/intermediate_language_dbc.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698