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

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

Issue 2680973013: [turbofan] extend escape analysis to reduce CheckMaps (Closed)
Patch Set: staged behind new flag --turbo-experimental 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-reducer.h ('k') | src/flag-definitions.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/escape-analysis-reducer.cc
diff --git a/src/compiler/escape-analysis-reducer.cc b/src/compiler/escape-analysis-reducer.cc
index c05092e06ea95f71ef958c121990df06254834e6..be772f4e7607796c58679f8064b060924278e5c6 100644
--- a/src/compiler/escape-analysis-reducer.cc
+++ b/src/compiler/escape-analysis-reducer.cc
@@ -44,6 +44,8 @@ Reduction EscapeAnalysisReducer::ReduceNode(Node* node) {
case IrOpcode::kStoreField:
case IrOpcode::kStoreElement:
return ReduceStore(node);
+ case IrOpcode::kCheckMaps:
+ return ReduceCheckMaps(node);
case IrOpcode::kAllocate:
return ReduceAllocate(node);
case IrOpcode::kFinishRegion:
@@ -166,6 +168,21 @@ Reduction EscapeAnalysisReducer::ReduceStore(Node* node) {
return NoChange();
}
+Reduction EscapeAnalysisReducer::ReduceCheckMaps(Node* node) {
+ DCHECK(node->opcode() == IrOpcode::kCheckMaps);
+ if (node->id() < static_cast<NodeId>(fully_reduced_.length())) {
+ fully_reduced_.Add(node->id());
+ }
+ if (escape_analysis()->IsVirtual(
+ SkipTypeGuards(NodeProperties::GetValueInput(node, 0))) &&
+ !escape_analysis()->IsEscaped(node)) {
+ TRACE("Removed #%d (%s) from effect chain\n", node->id(),
+ node->op()->mnemonic());
+ RelaxEffectsAndControls(node);
+ return Changed(node);
+ }
+ return NoChange();
+}
Reduction EscapeAnalysisReducer::ReduceAllocate(Node* node) {
DCHECK_EQ(node->opcode(), IrOpcode::kAllocate);
« no previous file with comments | « src/compiler/escape-analysis-reducer.h ('k') | src/flag-definitions.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698