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

Unified Diff: runtime/vm/aot_optimizer.cc

Issue 2047433005: Remove unused code from aot optimizer. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 6 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/aot_optimizer.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/aot_optimizer.cc
diff --git a/runtime/vm/aot_optimizer.cc b/runtime/vm/aot_optimizer.cc
index f7c741dc11d73184e253f926d6c9d12792e71a75..25074516d074f0c4042effded046301a806dbc92 100644
--- a/runtime/vm/aot_optimizer.cc
+++ b/runtime/vm/aot_optimizer.cc
@@ -108,8 +108,6 @@ void AotOptimizer::ApplyClassIds() {
VisitInstanceCall(call);
}
}
- } else if (instr->IsPolymorphicInstanceCall()) {
- SpecializePolymorphicInstanceCall(instr->AsPolymorphicInstanceCall());
}
}
current_iterator_ = NULL;
@@ -268,37 +266,6 @@ const ICData& AotOptimizer::TrySpecializeICData(const ICData& ic_data,
}
-void AotOptimizer::SpecializePolymorphicInstanceCall(
- PolymorphicInstanceCallInstr* call) {
- if (!FLAG_polymorphic_with_deopt) {
- // Specialization adds receiver checks which can lead to deoptimization.
- return;
- }
- if (!call->with_checks()) {
- return; // Already specialized.
- }
-
- const intptr_t receiver_cid =
- call->PushArgumentAt(0)->value()->Type()->ToCid();
- if (receiver_cid == kDynamicCid) {
- return; // No information about receiver was infered.
- }
-
- const ICData& ic_data = TrySpecializeICData(call->ic_data(), receiver_cid);
- if (ic_data.raw() == call->ic_data().raw()) {
- // No specialization.
- return;
- }
-
- PolymorphicInstanceCallInstr* specialized =
- new(Z) PolymorphicInstanceCallInstr(call->instance_call(),
- ic_data,
- /* with_checks = */ false,
- /* complete = */ false);
- call->ReplaceWith(specialized, current_iterator());
-}
-
-
static BinarySmiOpInstr* AsSmiShiftLeftInstruction(Definition* d) {
BinarySmiOpInstr* instr = d->AsBinarySmiOp();
if ((instr != NULL) && (instr->op_kind() == Token::kSHL)) {
« no previous file with comments | « runtime/vm/aot_optimizer.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698