Commit 9e7b928f authored by bmeurer's avatar bmeurer Committed by Commit Bot

Revert of [turbofan] Extend escape analysis to reduce certain CheckMaps....

Revert of [turbofan] Extend escape analysis to reduce certain CheckMaps. (patchset #1 id:1 of https://codereview.chromium.org/2964473002/ )

Reason for revert:
Speculative revert for tiny fire on Canary (crbug.com/738781)

Original issue's description:
> [turbofan] Extend escape analysis to reduce certain CheckMaps.
>
> Enable the experimental support in escape analysis to deal with
> constant-foldable CheckMaps nodes and remove them from the effect
> chain w/o blocking the scalar replacement of the object.
>
> BUG=v8:4586,v8:5267
> R=tebbi@chromium.org
>
> Review-Url: https://codereview.chromium.org/2964473002
> Cr-Commit-Position: refs/heads/master@{#46311}
> Committed: https://chromium.googlesource.com/v8/v8/+/adf7f54e24c4b31207b4df0e30c28f7579b18f5c

TBR=tebbi@chromium.org
# Not skipping CQ checks because original CL landed more than 1 days ago.
BUG=v8:4586,v8:5267

Review-Url: https://codereview.chromium.org/2970663002
Cr-Commit-Position: refs/heads/master@{#46372}
parent 3269141c
...@@ -1517,30 +1517,33 @@ void EscapeAnalysis::ProcessCheckMaps(Node* node) { ...@@ -1517,30 +1517,33 @@ void EscapeAnalysis::ProcessCheckMaps(Node* node) {
DCHECK_EQ(node->opcode(), IrOpcode::kCheckMaps); DCHECK_EQ(node->opcode(), IrOpcode::kCheckMaps);
ForwardVirtualState(node); ForwardVirtualState(node);
Node* checked = ResolveReplacement(NodeProperties::GetValueInput(node, 0)); Node* checked = ResolveReplacement(NodeProperties::GetValueInput(node, 0));
VirtualState* state = virtual_states_[node->id()]; if (FLAG_turbo_experimental) {
if (VirtualObject* object = GetVirtualObject(state, checked)) { VirtualState* state = virtual_states_[node->id()];
if (!object->IsTracked()) { if (VirtualObject* object = GetVirtualObject(state, checked)) {
if (status_analysis_->SetEscaped(node)) { if (!object->IsTracked()) {
TRACE( if (status_analysis_->SetEscaped(node)) {
"Setting #%d (%s) to escaped because checked object #%i is not " TRACE(
"tracked\n", "Setting #%d (%s) to escaped because checked object #%i is not "
node->id(), node->op()->mnemonic(), object->id()); "tracked\n",
node->id(), node->op()->mnemonic(), object->id());
}
return;
} }
return; CheckMapsParameters params = CheckMapsParametersOf(node->op());
}
CheckMapsParameters params = CheckMapsParametersOf(node->op());
Node* value = object->GetField(HeapObject::kMapOffset / kPointerSize); Node* value = object->GetField(HeapObject::kMapOffset / kPointerSize);
if (value) { if (value) {
value = ResolveReplacement(value); value = ResolveReplacement(value);
// TODO(tebbi): We want to extend this beyond constant folding with a // TODO(tebbi): We want to extend this beyond constant folding with a
// CheckMapsValue operator that takes the load-eliminated map value as // CheckMapsValue operator that takes the load-eliminated map value as
// input. // input.
if (value->opcode() == IrOpcode::kHeapConstant && if (value->opcode() == IrOpcode::kHeapConstant &&
params.maps().contains(ZoneHandleSet<Map>( params.maps().contains(ZoneHandleSet<Map>(
Handle<Map>::cast(OpParameter<Handle<HeapObject>>(value))))) { Handle<Map>::cast(OpParameter<Handle<HeapObject>>(value))))) {
TRACE("CheckMaps #%i seems to be redundant (until now).\n", node->id()); TRACE("CheckMaps #%i seems to be redundant (until now).\n",
return; node->id());
return;
}
} }
} }
} }
......
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