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

Unified Diff: src/compiler/escape-analysis.cc

Issue 2704573003: Revert of [turbofan] extend escape analysis to reduce CheckMaps (Closed)
Patch Set: Created 3 years, 10 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 | « src/compiler/escape-analysis.h ('k') | src/compiler/escape-analysis-reducer.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/escape-analysis.cc
diff --git a/src/compiler/escape-analysis.cc b/src/compiler/escape-analysis.cc
index c159f1ad385dd295e9f8b3537b2251d120d18a4c..9372e620248fbee46e34093c835b6bdcea8a1ad8 100644
--- a/src/compiler/escape-analysis.cc
+++ b/src/compiler/escape-analysis.cc
@@ -687,16 +687,7 @@
RevisitInputs(rep);
RevisitUses(rep);
}
- } else {
- Node* from = NodeProperties::GetValueInput(node, 0);
- if (SetEscaped(from)) {
- TRACE("Setting #%d (%s) to escaped because of unresolved load #%i\n",
- from->id(), from->op()->mnemonic(), node->id());
- RevisitInputs(from);
- RevisitUses(from);
- }
- }
-
+ }
RevisitUses(node);
break;
}
@@ -800,7 +791,6 @@
case IrOpcode::kStateValues:
case IrOpcode::kReferenceEqual:
case IrOpcode::kFinishRegion:
- case IrOpcode::kCheckMaps:
if (IsEscaped(use) && SetEscaped(rep)) {
TRACE(
"Setting #%d (%s) to escaped because of use by escaping node "
@@ -901,7 +891,7 @@
EscapeAnalysis::~EscapeAnalysis() {}
-bool EscapeAnalysis::Run() {
+void EscapeAnalysis::Run() {
replacements_.resize(graph()->NodeCount());
status_analysis_->AssignAliases();
if (status_analysis_->AliasCount() > 0) {
@@ -910,9 +900,6 @@
status_analysis_->ResizeStatusVector();
RunObjectAnalysis();
status_analysis_->RunStatusAnalysis();
- return true;
- } else {
- return false;
}
}
@@ -1118,9 +1105,6 @@
case IrOpcode::kLoadElement:
ProcessLoadElement(node);
break;
- case IrOpcode::kCheckMaps:
- ProcessCheckMaps(node);
- break;
case IrOpcode::kStart:
ProcessStart(node);
break;
@@ -1158,10 +1142,6 @@
case IrOpcode::kFinishRegion:
case IrOpcode::kObjectIsSmi:
break;
- case IrOpcode::kCheckMaps: {
- CheckMapsParameters params = CheckMapsParametersOf(node->op());
- if (params.flags() == CheckMapsFlag::kNone) break;
- } // Fallthrough.
default:
VirtualState* state = virtual_states_[node->id()];
if (VirtualObject* obj =
@@ -1512,43 +1492,6 @@
ProcessLoadFromPhi(offset, from, node, state);
} else {
UpdateReplacement(state, node, nullptr);
- }
-}
-
-void EscapeAnalysis::ProcessCheckMaps(Node* node) {
- DCHECK_EQ(node->opcode(), IrOpcode::kCheckMaps);
- ForwardVirtualState(node);
- Node* checked = ResolveReplacement(NodeProperties::GetValueInput(node, 0));
- VirtualState* state = virtual_states_[node->id()];
- if (VirtualObject* object = GetVirtualObject(state, checked)) {
- if (!object->IsTracked()) {
- if (status_analysis_->SetEscaped(node)) {
- TRACE(
- "Setting #%d (%s) to escaped because checked object #%i is not "
- "tracked\n",
- node->id(), node->op()->mnemonic(), object->id());
- }
- return;
- }
- CheckMapsParameters params = CheckMapsParametersOf(node->op());
-
- Node* value = object->GetField(HeapObject::kMapOffset / kPointerSize);
- if (value) {
- value = ResolveReplacement(value);
- // TODO(tebbi): We want to extend this beyond constant folding with a
- // CheckMapsValue operator that takes the load-eliminated map value as
- // input.
- if (value->opcode() == IrOpcode::kHeapConstant &&
- params.maps().contains(ZoneHandleSet<Map>(
- Handle<Map>::cast(OpParameter<Handle<HeapObject>>(value))))) {
- TRACE("CheckMaps #%i seems to be redundant (until now).\n", node->id());
- return;
- }
- }
- }
- if (status_analysis_->SetEscaped(node)) {
- TRACE("Setting #%d (%s) to escaped (checking #%i)\n", node->id(),
- node->op()->mnemonic(), checked->id());
}
}
« no previous file with comments | « src/compiler/escape-analysis.h ('k') | src/compiler/escape-analysis-reducer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698