Commit 872c3936 authored by Sigurd Schneider's avatar Sigurd Schneider Committed by Commit Bot

[turbofan] Brokerize more maps for load elimination

This is pre-work to extend the typer phase until after load elinination.

Load elimination uses maps from CheckMaps/MapGuard/CompareMaps/LoadField
and this CL ensures they are brokerized.

Bug: v8:7790
Change-Id: Ic04f9c374bc736f03abf2bc7d257deb268d723c8
Reviewed-on: https://chromium-review.googlesource.com/c/1341950Reviewed-by: 's avatarGeorg Neis <neis@chromium.org>
Reviewed-by: 's avatarBenedikt Meurer <bmeurer@chromium.org>
Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
Cr-Commit-Position: refs/heads/master@{#57628}
parent 53b0c624
......@@ -8,6 +8,7 @@
#include "src/compiler/js-heap-broker.h"
#include "src/compiler/js-operator.h"
#include "src/compiler/node-properties.h"
#include "src/compiler/simplified-operator.h"
#include "src/heap/factory-inl.h"
#include "src/objects/map.h"
#include "src/objects/scope-info.h"
......@@ -99,6 +100,42 @@ Reduction JSHeapCopyReducer::Reduce(Node* node) {
NameRef(broker(), p.name());
break;
}
case IrOpcode::kStoreField:
case IrOpcode::kLoadField: {
FieldAccess access = FieldAccessOf(node->op());
Handle<Map> map_handle;
if (access.map.ToHandle(&map_handle)) {
MapRef(broker(), map_handle);
}
Handle<Name> name_handle;
if (access.name.ToHandle(&name_handle)) {
NameRef(broker(), name_handle);
}
break;
}
case IrOpcode::kMapGuard: {
ZoneHandleSet<Map> const maps = MapGuardMapsOf(node->op()).maps();
for (Handle<Map> map : maps) {
MapRef(broker(), map);
}
break;
}
case IrOpcode::kCheckMaps: {
ZoneHandleSet<Map> const maps = CheckMapsParametersOf(node->op()).maps();
for (Handle<Map> map : maps) {
MapRef(broker(), map);
}
break;
}
case IrOpcode::kCompareMaps: {
ZoneHandleSet<Map> const maps =
CompareMapsParametersOf(node->op()).maps();
for (Handle<Map> map : maps) {
MapRef(broker(), map);
}
break;
}
default:
break;
}
......
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