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

Unified Diff: src/compiler/memory-optimizer.cc

Issue 2357573002: [turbofan] Introduce PretenureFlagOf helper function. (Closed)
Patch Set: Now with all the code. Created 4 years, 3 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 | src/compiler/simplified-operator.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/memory-optimizer.cc
diff --git a/src/compiler/memory-optimizer.cc b/src/compiler/memory-optimizer.cc
index 05fc6e75792b2bbe6db29b76a447aae47162c230..66fcbb936223d3a4297b4a4b923e1acff271bb96 100644
--- a/src/compiler/memory-optimizer.cc
+++ b/src/compiler/memory-optimizer.cc
@@ -107,7 +107,7 @@ void MemoryOptimizer::VisitAllocate(Node* node, AllocationState const* state) {
Node* size = node->InputAt(0);
Node* effect = node->InputAt(1);
Node* control = node->InputAt(2);
- PretenureFlag pretenure = OpParameter<PretenureFlag>(node->op());
+ PretenureFlag pretenure = PretenureFlagOf(node->op());
// Propagate tenuring from outer allocations to inner allocations, i.e.
// when we allocate an object in old space and store a newly allocated
@@ -119,7 +119,7 @@ void MemoryOptimizer::VisitAllocate(Node* node, AllocationState const* state) {
if (user->opcode() == IrOpcode::kStoreField && edge.index() == 0) {
Node* const child = user->InputAt(1);
if (child->opcode() == IrOpcode::kAllocate &&
- OpParameter<PretenureFlag>(child) == NOT_TENURED) {
+ PretenureFlagOf(child->op()) == NOT_TENURED) {
NodeProperties::ChangeOp(child, node->op());
break;
}
@@ -132,7 +132,7 @@ void MemoryOptimizer::VisitAllocate(Node* node, AllocationState const* state) {
if (user->opcode() == IrOpcode::kStoreField && edge.index() == 1) {
Node* const parent = user->InputAt(0);
if (parent->opcode() == IrOpcode::kAllocate &&
- OpParameter<PretenureFlag>(parent) == TENURED) {
+ PretenureFlagOf(parent->op()) == TENURED) {
pretenure = TENURED;
break;
}
« no previous file with comments | « no previous file | src/compiler/simplified-operator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698