Commit 32f4b268 authored by Adam Klein's avatar Adam Klein Committed by V8 LUCI CQ

Revert "Reland "[turbofan] Support Phi nodes in SL Verifier""

This reverts commit 97d1ab6c.

Reason for revert: simplified lowering verifier crashes on GPU bots:
https://ci.chromium.org/ui/p/v8/builders/ci/Linux%20V8%20FYI%20Release%20(NVIDIA)/20848/overview

Original change's description:
> Reland "[turbofan] Support Phi nodes in SL Verifier"
>
> This reverts commit 82a876b0.
>
> Bug: v8:13086, v8:12619
> Change-Id: Idcc42f36b642fefb3ed706214e7385cccc89effc
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3779687
> Auto-Submit: Nico Hartmann <nicohartmann@chromium.org>
> Commit-Queue: Nico Hartmann <nicohartmann@chromium.org>
> Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#82285}

Bug: v8:13086, v8:12619
Change-Id: I7a2fb19eb752403337d45de0a7ca02a5d8842766
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3820904
Auto-Submit: Adam Klein <adamk@chromium.org>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Commit-Queue: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Cr-Commit-Position: refs/heads/main@{#82320}
parent e4eba195
...@@ -1124,8 +1124,7 @@ Reduction JSTypedLowering::ReduceJSToObject(Node* node) { ...@@ -1124,8 +1124,7 @@ Reduction JSTypedLowering::ReduceJSToObject(Node* node) {
Node* if_true = graph()->NewNode(common()->IfTrue(), branch); Node* if_true = graph()->NewNode(common()->IfTrue(), branch);
Node* etrue = effect; Node* etrue = effect;
Node* rtrue = etrue = graph()->NewNode(common()->TypeGuard(Type::Receiver()), Node* rtrue = receiver;
receiver, etrue, if_true);
Node* if_false = graph()->NewNode(common()->IfFalse(), branch); Node* if_false = graph()->NewNode(common()->IfFalse(), branch);
Node* efalse = effect; Node* efalse = effect;
...@@ -1141,8 +1140,6 @@ Reduction JSTypedLowering::ReduceJSToObject(Node* node) { ...@@ -1141,8 +1140,6 @@ Reduction JSTypedLowering::ReduceJSToObject(Node* node) {
graph()->NewNode(common()->Call(call_descriptor), graph()->NewNode(common()->Call(call_descriptor),
jsgraph()->HeapConstant(callable.code()), receiver, jsgraph()->HeapConstant(callable.code()), receiver,
context, frame_state, efalse, if_false); context, frame_state, efalse, if_false);
// Preserve the type inferred by the typer.
NodeProperties::SetType(rfalse, NodeProperties::GetType(node));
} }
// Update potential {IfException} uses of {node} to point to the above // Update potential {IfException} uses of {node} to point to the above
...@@ -1222,11 +1219,7 @@ Reduction JSTypedLowering::ReduceJSHasInPrototypeChain(Node* node) { ...@@ -1222,11 +1219,7 @@ Reduction JSTypedLowering::ReduceJSHasInPrototypeChain(Node* node) {
NodeProperties::MergeControlToEnd(graph(), common(), terminate); NodeProperties::MergeControlToEnd(graph(), common(), terminate);
Node* vloop = value = graph()->NewNode( Node* vloop = value = graph()->NewNode(
common()->Phi(MachineRepresentation::kTagged, 2), value, value, loop); common()->Phi(MachineRepresentation::kTagged, 2), value, value, loop);
// Typer might put a type on the above Phi node. We reset that to Type::Any NodeProperties::SetType(vloop, Type::NonInternal());
// and provide the type using a TypeGuard to enforce a consistent typing.
NodeProperties::SetType(value, Type::Any());
effect = value = graph()->NewNode(common()->TypeGuard(Type::NonInternal()),
value, effect, control);
// Load the {value} map and instance type. // Load the {value} map and instance type.
Node* value_map = effect = graph()->NewNode( Node* value_map = effect = graph()->NewNode(
......
...@@ -334,19 +334,6 @@ void SimplifiedLoweringVerifier::VisitNode(Node* node, ...@@ -334,19 +334,6 @@ void SimplifiedLoweringVerifier::VisitNode(Node* node,
SetTruncation(node, Truncation::Any()); SetTruncation(node, Truncation::Any());
break; break;
} }
case IrOpcode::kPhi: {
const int arity = node->op()->ValueInputCount();
Type output_type = InputType(node, 0);
Truncation output_trunc = InputTruncation(node, 0);
for (int i = 1; i < arity; ++i) {
output_type =
Type::Union(output_type, InputType(node, i), graph_zone());
output_trunc =
LeastGeneralTruncation(output_trunc, InputTruncation(node, i));
}
CheckAndSet(node, output_type, output_trunc);
break;
}
#define CASE(code, ...) case IrOpcode::k##code: #define CASE(code, ...) case IrOpcode::k##code:
// Control operators // Control operators
...@@ -376,6 +363,7 @@ void SimplifiedLoweringVerifier::VisitNode(Node* node, ...@@ -376,6 +363,7 @@ void SimplifiedLoweringVerifier::VisitNode(Node* node,
CASE(RelocatableInt64Constant) CASE(RelocatableInt64Constant)
// Inner operators // Inner operators
CASE(Select) CASE(Select)
CASE(Phi)
CASE(InductionVariablePhi) CASE(InductionVariablePhi)
CASE(BeginRegion) CASE(BeginRegion)
CASE(FinishRegion) CASE(FinishRegion)
......
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