Commit 6eed6cc0 authored by Georg Schmid's avatar Georg Schmid Committed by Commit Bot

[turbofan] Disable TypedOptimization for loop-related Phi nodes

TypeNarrowing and TypedOptimization can successively narrow range types of loop variables. In the presence of new, precise information on such loop variables, e.g. due to load elimination, many such narrowing steps are necessary, however, leading to very slow convergence of optimizations and an explosion in memory consumption. Until we have a sound way of speeding this process up, we disable TypedOptimization on loop-related Phi nodes.

R=bmeurer@chromium.org, mvstanton@chromium.org

Bug: chromium:978750
Change-Id: Ibce7db69807d2c1bc6a56c2f0287440bec0ce04b
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1687892
Commit-Queue: Georg Schmid <gsps@google.com>
Commit-Queue: Michael Stanton <mvstanton@chromium.org>
Reviewed-by: 's avatarMichael Stanton <mvstanton@chromium.org>
Cr-Commit-Position: refs/heads/master@{#62513}
parent bdf7fea4
......@@ -329,6 +329,12 @@ Reduction TypedOptimization::ReducePhi(Node* node) {
// after lowering based on types, i.e. a SpeculativeNumberAdd has a more
// precise type than the JSAdd that was in the graph when the Typer was run.
DCHECK_EQ(IrOpcode::kPhi, node->opcode());
// Prevent new types from being propagated through loop-related Phis for now.
// This is to avoid slow convergence of type narrowing when we learn very
// precise information about loop variables.
if (NodeProperties::GetControlInput(node, 0)->opcode() == IrOpcode::kLoop) {
return NoChange();
}
int arity = node->op()->ValueInputCount();
Type type = NodeProperties::GetType(node->InputAt(0));
for (int i = 1; i < arity; ++i) {
......
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