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

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

Issue 2803643004: [turbofan] reenable: extend escape analysis to reduce CheckMaps (Closed)
Patch Set: Created 3 years, 8 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 | « no previous file | no next file » | 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 451471247da9c0730d1e8a72d2f0fa1b54783470..2d6aa6bc56506d07c7feb8c3302e49173028843f 100644
--- a/src/compiler/escape-analysis.cc
+++ b/src/compiler/escape-analysis.cc
@@ -1529,33 +1529,30 @@ void EscapeAnalysis::ProcessCheckMaps(Node* node) {
DCHECK_EQ(node->opcode(), IrOpcode::kCheckMaps);
ForwardVirtualState(node);
Node* checked = ResolveReplacement(NodeProperties::GetValueInput(node, 0));
- if (FLAG_turbo_experimental) {
Tobias Tebbi 2017/04/06 13:45:17 Why doesn't it ignore whitespace? This CL really j
- 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;
+ 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());
}
- CheckMapsParameters params = CheckMapsParametersOf(node->op());
+ 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;
- }
+ 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;
}
}
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698