Commit 424e2535 authored by Sathya Gunasekaran's avatar Sathya Gunasekaran Committed by Commit Bot

[ic] Remove reordering of deprecated maps in feedback

Now that we loop the entire polymorphic weak fixed array, there's
no need to reorder the deprecated maps.

Bug: v8:10582
Change-Id: Icf03d6c0ada34f385ffb747c7246c79f7341106d
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2530875Reviewed-by: 's avatarMythri Alle <mythria@chromium.org>
Commit-Queue: Sathya Gunasekaran  <gsathya@chromium.org>
Cr-Commit-Position: refs/heads/master@{#71144}
parent 1c32d326
......@@ -574,7 +574,7 @@ bool IC::UpdatePolymorphicIC(Handle<Name> name,
std::vector<MapAndHandler> maps_and_handlers;
maps_and_handlers.reserve(FLAG_max_valid_polymorphic_map_count);
std::vector<MapAndHandler> deprecated_maps_and_handlers;
int deprecated_maps = 0;
int handler_to_overwrite = -1;
{
......@@ -585,17 +585,13 @@ bool IC::UpdatePolymorphicIC(Handle<Name> name,
MaybeObjectHandle existing_handler = handle(it.handler(), isolate());
Handle<Map> existing_map = handle(it.map(), isolate());
if (existing_map->is_deprecated()) {
// Filter out deprecated maps to ensure their instances get migrated.
deprecated_maps_and_handlers.push_back(
MapAndHandler(existing_map, existing_handler));
continue;
}
maps_and_handlers.push_back(
MapAndHandler(existing_map, existing_handler));
if (map.is_identical_to(existing_map)) {
if (existing_map->is_deprecated()) {
// Filter out deprecated maps to ensure their instances get migrated.
deprecated_maps++;
} else if (map.is_identical_to(existing_map)) {
// If both map and handler stayed the same (and the name is also the
// same as checked above, for keyed accesses), we're not progressing
// in the lattice and need to go MEGAMORPHIC instead. There's one
......@@ -620,9 +616,7 @@ bool IC::UpdatePolymorphicIC(Handle<Name> name,
DCHECK_LE(i, maps_and_handlers.size());
}
int deprecated_maps = static_cast<int>(deprecated_maps_and_handlers.size());
int number_of_maps =
static_cast<int>(maps_and_handlers.size()) + deprecated_maps;
int number_of_maps = static_cast<int>(maps_and_handlers.size());
int number_of_valid_maps =
number_of_maps - deprecated_maps - (handler_to_overwrite != -1);
......@@ -647,15 +641,6 @@ bool IC::UpdatePolymorphicIC(Handle<Name> name,
maps_and_handlers.push_back(MapAndHandler(map, handler));
}
// Reorder the deprecated maps to be at the end, so that
// minimorphic ICs have the best chance of succeeding as they only
// check the first FLAG_max_minimorphic_map_checks maps.
if (deprecated_maps_and_handlers.size() > 0) {
maps_and_handlers.insert(maps_and_handlers.end(),
deprecated_maps_and_handlers.begin(),
deprecated_maps_and_handlers.end());
}
ConfigureVectorState(name, maps_and_handlers);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment