Commit 46062a15 authored by Santiago Aboy Solanes's avatar Santiago Aboy Solanes Committed by Commit Bot

[ptr-compr][turbofan] Removing LoadMessage/StoreMessage simplified operators

Going back on https://chromium-review.googlesource.com/c/v8/v8/+/1445978
since now 'tagged' means 'full tagged' again.

Cq-Include-Trybots: luci.v8.try:v8_linux64_pointer_compression_rel_ng
Cq-Include-Trybots: luci.v8.try:v8_linux64_arm64_pointer_compression_rel_ng
Bug: v8:8977, v8:7703
Change-Id: I3e39d631cc720a28577dad482dadfcc8332b6b18
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1593301
Commit-Queue: Santiago Aboy Solanes <solanes@chromium.org>
Reviewed-by: 's avatarJaroslav Sevcik <jarin@chromium.org>
Reviewed-by: 's avatarSigurd Schneider <sigurds@chromium.org>
Reviewed-by: 's avatarMichael Stanton <mvstanton@chromium.org>
Cr-Commit-Position: refs/heads/master@{#61339}
parent a58a9371
...@@ -23,9 +23,10 @@ namespace internal { ...@@ -23,9 +23,10 @@ namespace internal {
namespace compiler { namespace compiler {
// static // static
FieldAccess AccessBuilder::ForExternalIntPtr() { FieldAccess AccessBuilder::ForExternalTaggedValue() {
FieldAccess access = {kUntaggedBase, 0, MaybeHandle<Name>(), FieldAccess access = {kUntaggedBase, 0,
MaybeHandle<Map>(), Type::Any(), MachineType::IntPtr(), MaybeHandle<Name>(), MaybeHandle<Map>(),
Type::Any(), MachineType::AnyTagged(),
kNoWriteBarrier}; kNoWriteBarrier};
return access; return access;
} }
......
...@@ -24,8 +24,8 @@ class V8_EXPORT_PRIVATE AccessBuilder final ...@@ -24,8 +24,8 @@ class V8_EXPORT_PRIVATE AccessBuilder final
// =========================================================================== // ===========================================================================
// Access to external values (based on external references). // Access to external values (based on external references).
// Provides access to an intptr field identified by an external reference. // Provides access to a tagged field identified by an external reference.
static FieldAccess ForExternalIntPtr(); static FieldAccess ForExternalTaggedValue();
// Provides access to an uint8 field identified by an external reference. // Provides access to an uint8 field identified by an external reference.
static FieldAccess ForExternalUint8Value(); static FieldAccess ForExternalUint8Value();
......
...@@ -998,12 +998,6 @@ bool EffectControlLinearizer::TryWireInStateEffect(Node* node, ...@@ -998,12 +998,6 @@ bool EffectControlLinearizer::TryWireInStateEffect(Node* node,
case IrOpcode::kTransitionElementsKind: case IrOpcode::kTransitionElementsKind:
LowerTransitionElementsKind(node); LowerTransitionElementsKind(node);
break; break;
case IrOpcode::kLoadMessage:
result = LowerLoadMessage(node);
break;
case IrOpcode::kStoreMessage:
LowerStoreMessage(node);
break;
case IrOpcode::kLoadFieldByIndex: case IrOpcode::kLoadFieldByIndex:
result = LowerLoadFieldByIndex(node); result = LowerLoadFieldByIndex(node);
break; break;
...@@ -4330,20 +4324,6 @@ void EffectControlLinearizer::LowerTransitionElementsKind(Node* node) { ...@@ -4330,20 +4324,6 @@ void EffectControlLinearizer::LowerTransitionElementsKind(Node* node) {
__ Bind(&done); __ Bind(&done);
} }
Node* EffectControlLinearizer::LowerLoadMessage(Node* node) {
Node* offset = node->InputAt(0);
Node* object_pattern =
__ LoadField(AccessBuilder::ForExternalIntPtr(), offset);
return __ BitcastWordToTagged(object_pattern);
}
void EffectControlLinearizer::LowerStoreMessage(Node* node) {
Node* offset = node->InputAt(0);
Node* object = node->InputAt(1);
Node* object_pattern = __ BitcastTaggedToWord(object);
__ StoreField(AccessBuilder::ForExternalIntPtr(), offset, object_pattern);
}
Node* EffectControlLinearizer::LowerLoadFieldByIndex(Node* node) { Node* EffectControlLinearizer::LowerLoadFieldByIndex(Node* node) {
Node* object = node->InputAt(0); Node* object = node->InputAt(0);
Node* index = node->InputAt(1); Node* index = node->InputAt(1);
......
...@@ -172,11 +172,9 @@ class V8_EXPORT_PRIVATE EffectControlLinearizer { ...@@ -172,11 +172,9 @@ class V8_EXPORT_PRIVATE EffectControlLinearizer {
Node* LowerMaybeGrowFastElements(Node* node, Node* frame_state); Node* LowerMaybeGrowFastElements(Node* node, Node* frame_state);
void LowerTransitionElementsKind(Node* node); void LowerTransitionElementsKind(Node* node);
Node* LowerLoadFieldByIndex(Node* node); Node* LowerLoadFieldByIndex(Node* node);
Node* LowerLoadMessage(Node* node);
Node* LowerLoadTypedElement(Node* node); Node* LowerLoadTypedElement(Node* node);
Node* LowerLoadDataViewElement(Node* node); Node* LowerLoadDataViewElement(Node* node);
Node* LowerLoadStackArgument(Node* node); Node* LowerLoadStackArgument(Node* node);
void LowerStoreMessage(Node* node);
void LowerStoreTypedElement(Node* node); void LowerStoreTypedElement(Node* node);
void LowerStoreDataViewElement(Node* node); void LowerStoreDataViewElement(Node* node);
void LowerStoreSignedSmallElement(Node* node); void LowerStoreSignedSmallElement(Node* node);
......
...@@ -2022,7 +2022,8 @@ Reduction JSTypedLowering::ReduceJSLoadMessage(Node* node) { ...@@ -2022,7 +2022,8 @@ Reduction JSTypedLowering::ReduceJSLoadMessage(Node* node) {
ExternalReference const ref = ExternalReference const ref =
ExternalReference::address_of_pending_message_obj(isolate()); ExternalReference::address_of_pending_message_obj(isolate());
node->ReplaceInput(0, jsgraph()->ExternalConstant(ref)); node->ReplaceInput(0, jsgraph()->ExternalConstant(ref));
NodeProperties::ChangeOp(node, simplified()->LoadMessage()); NodeProperties::ChangeOp(
node, simplified()->LoadField(AccessBuilder::ForExternalTaggedValue()));
return Changed(node); return Changed(node);
} }
...@@ -2033,7 +2034,8 @@ Reduction JSTypedLowering::ReduceJSStoreMessage(Node* node) { ...@@ -2033,7 +2034,8 @@ Reduction JSTypedLowering::ReduceJSStoreMessage(Node* node) {
Node* value = NodeProperties::GetValueInput(node, 0); Node* value = NodeProperties::GetValueInput(node, 0);
node->ReplaceInput(0, jsgraph()->ExternalConstant(ref)); node->ReplaceInput(0, jsgraph()->ExternalConstant(ref));
node->ReplaceInput(1, value); node->ReplaceInput(1, value);
NodeProperties::ChangeOp(node, simplified()->StoreMessage()); NodeProperties::ChangeOp(
node, simplified()->StoreField(AccessBuilder::ForExternalTaggedValue()));
return Changed(node); return Changed(node);
} }
......
...@@ -116,10 +116,6 @@ Reduction LoadElimination::Reduce(Node* node) { ...@@ -116,10 +116,6 @@ Reduction LoadElimination::Reduce(Node* node) {
return ReduceLoadField(node, FieldAccessOf(node->op())); return ReduceLoadField(node, FieldAccessOf(node->op()));
case IrOpcode::kStoreField: case IrOpcode::kStoreField:
return ReduceStoreField(node, FieldAccessOf(node->op())); return ReduceStoreField(node, FieldAccessOf(node->op()));
case IrOpcode::kStoreMessage:
return ReduceStoreField(node, AccessBuilder::ForExternalIntPtr());
case IrOpcode::kLoadMessage:
return ReduceLoadField(node, AccessBuilder::ForExternalIntPtr());
case IrOpcode::kLoadElement: case IrOpcode::kLoadElement:
return ReduceLoadElement(node); return ReduceLoadElement(node);
case IrOpcode::kStoreElement: case IrOpcode::kStoreElement:
...@@ -1156,10 +1152,6 @@ LoadElimination::AbstractState const* LoadElimination::ComputeLoopState( ...@@ -1156,10 +1152,6 @@ LoadElimination::AbstractState const* LoadElimination::ComputeLoopState(
state = ComputeLoopStateForStoreField(current, state, state = ComputeLoopStateForStoreField(current, state,
FieldAccessOf(current->op())); FieldAccessOf(current->op()));
break; break;
case IrOpcode::kStoreMessage:
state = ComputeLoopStateForStoreField(
current, state, AccessBuilder::ForExternalIntPtr());
break;
case IrOpcode::kStoreElement: { case IrOpcode::kStoreElement: {
Node* const object = NodeProperties::GetValueInput(current, 0); Node* const object = NodeProperties::GetValueInput(current, 0);
Node* const index = NodeProperties::GetValueInput(current, 1); Node* const index = NodeProperties::GetValueInput(current, 1);
......
...@@ -251,8 +251,6 @@ class V8_EXPORT_PRIVATE LoadElimination final ...@@ -251,8 +251,6 @@ class V8_EXPORT_PRIVATE LoadElimination final
Reduction ReduceStoreTypedElement(Node* node); Reduction ReduceStoreTypedElement(Node* node);
Reduction ReduceEffectPhi(Node* node); Reduction ReduceEffectPhi(Node* node);
Reduction ReduceStart(Node* node); Reduction ReduceStart(Node* node);
Reduction ReduceStoreMessage(Node* node);
Reduction ReduceLoadMessage(Node* node);
Reduction ReduceOtherNode(Node* node); Reduction ReduceOtherNode(Node* node);
Reduction UpdateState(Node* node, AbstractState const* state); Reduction UpdateState(Node* node, AbstractState const* state);
......
...@@ -411,13 +411,11 @@ ...@@ -411,13 +411,11 @@
V(LoadFieldByIndex) \ V(LoadFieldByIndex) \
V(LoadField) \ V(LoadField) \
V(LoadElement) \ V(LoadElement) \
V(LoadMessage) \
V(LoadTypedElement) \ V(LoadTypedElement) \
V(LoadDataViewElement) \ V(LoadDataViewElement) \
V(LoadStackArgument) \ V(LoadStackArgument) \
V(StoreField) \ V(StoreField) \
V(StoreElement) \ V(StoreElement) \
V(StoreMessage) \
V(StoreTypedElement) \ V(StoreTypedElement) \
V(StoreDataViewElement) \ V(StoreDataViewElement) \
V(StoreSignedSmallElement) \ V(StoreSignedSmallElement) \
......
...@@ -2769,18 +2769,6 @@ class RepresentationSelector { ...@@ -2769,18 +2769,6 @@ class RepresentationSelector {
SetOutput(node, MachineRepresentation::kTaggedPointer); SetOutput(node, MachineRepresentation::kTaggedPointer);
return; return;
} }
case IrOpcode::kLoadMessage: {
if (truncation.IsUnused()) return VisitUnused(node);
VisitUnop(node, UseInfo::Word(), MachineRepresentation::kTagged);
return;
}
case IrOpcode::kStoreMessage: {
ProcessInput(node, 0, UseInfo::Word());
ProcessInput(node, 1, UseInfo::AnyTagged());
ProcessRemainingInputs(node, 2);
SetOutput(node, MachineRepresentation::kNone);
return;
}
case IrOpcode::kLoadFieldByIndex: { case IrOpcode::kLoadFieldByIndex: {
if (truncation.IsUnused()) return VisitUnused(node); if (truncation.IsUnused()) return VisitUnused(node);
VisitBinop(node, UseInfo::AnyTagged(), UseInfo::TruncatingWord32(), VisitBinop(node, UseInfo::AnyTagged(), UseInfo::TruncatingWord32(),
......
...@@ -1119,28 +1119,6 @@ struct SimplifiedOperatorGlobalCache final { ...@@ -1119,28 +1119,6 @@ struct SimplifiedOperatorGlobalCache final {
}; };
LoadStackArgumentOperator kLoadStackArgument; LoadStackArgumentOperator kLoadStackArgument;
struct LoadMessageOperator final : public Operator {
LoadMessageOperator()
: Operator( // --
IrOpcode::kLoadMessage, // opcode
Operator::kNoDeopt | Operator::kNoThrow |
Operator::kNoWrite, // flags
"LoadMessage", // name
1, 1, 1, 1, 1, 0) {} // counts
};
LoadMessageOperator kLoadMessage;
struct StoreMessageOperator final : public Operator {
StoreMessageOperator()
: Operator( // --
IrOpcode::kStoreMessage, // opcode
Operator::kNoDeopt | Operator::kNoThrow |
Operator::kNoRead, // flags
"StoreMessage", // name
2, 1, 1, 0, 1, 0) {} // counts
};
StoreMessageOperator kStoreMessage;
#define SPECULATIVE_NUMBER_BINOP(Name) \ #define SPECULATIVE_NUMBER_BINOP(Name) \
template <NumberOperationHint kHint> \ template <NumberOperationHint kHint> \
struct Name##Operator final : public Operator1<NumberOperationHint> { \ struct Name##Operator final : public Operator1<NumberOperationHint> { \
...@@ -1733,14 +1711,6 @@ SPECULATIVE_NUMBER_BINOP_LIST(SPECULATIVE_NUMBER_BINOP) ...@@ -1733,14 +1711,6 @@ SPECULATIVE_NUMBER_BINOP_LIST(SPECULATIVE_NUMBER_BINOP)
ACCESS_OP_LIST(ACCESS) ACCESS_OP_LIST(ACCESS)
#undef ACCESS #undef ACCESS
const Operator* SimplifiedOperatorBuilder::LoadMessage() {
return &cache_.kLoadMessage;
}
const Operator* SimplifiedOperatorBuilder::StoreMessage() {
return &cache_.kStoreMessage;
}
const Operator* SimplifiedOperatorBuilder::LoadStackArgument() { const Operator* SimplifiedOperatorBuilder::LoadStackArgument() {
return &cache_.kLoadStackArgument; return &cache_.kLoadStackArgument;
} }
......
...@@ -806,9 +806,6 @@ class V8_EXPORT_PRIVATE SimplifiedOperatorBuilder final ...@@ -806,9 +806,6 @@ class V8_EXPORT_PRIVATE SimplifiedOperatorBuilder final
const Operator* LoadField(FieldAccess const&); const Operator* LoadField(FieldAccess const&);
const Operator* StoreField(FieldAccess const&); const Operator* StoreField(FieldAccess const&);
const Operator* LoadMessage();
const Operator* StoreMessage();
// load-element [base + index] // load-element [base + index]
const Operator* LoadElement(ElementAccess const&); const Operator* LoadElement(ElementAccess const&);
......
...@@ -2151,8 +2151,6 @@ Type Typer::Visitor::TypeLoadField(Node* node) { ...@@ -2151,8 +2151,6 @@ Type Typer::Visitor::TypeLoadField(Node* node) {
return FieldAccessOf(node->op()).type; return FieldAccessOf(node->op()).type;
} }
Type Typer::Visitor::TypeLoadMessage(Node* node) { return Type::Any(); }
Type Typer::Visitor::TypeLoadElement(Node* node) { Type Typer::Visitor::TypeLoadElement(Node* node) {
return ElementAccessOf(node->op()).type; return ElementAccessOf(node->op()).type;
} }
...@@ -2184,7 +2182,6 @@ Type Typer::Visitor::TypeLoadDataViewElement(Node* node) { ...@@ -2184,7 +2182,6 @@ Type Typer::Visitor::TypeLoadDataViewElement(Node* node) {
} }
Type Typer::Visitor::TypeStoreField(Node* node) { UNREACHABLE(); } Type Typer::Visitor::TypeStoreField(Node* node) { UNREACHABLE(); }
Type Typer::Visitor::TypeStoreMessage(Node* node) { UNREACHABLE(); }
Type Typer::Visitor::TypeStoreElement(Node* node) { UNREACHABLE(); } Type Typer::Visitor::TypeStoreElement(Node* node) { UNREACHABLE(); }
......
...@@ -1553,7 +1553,6 @@ void Verifier::Visitor::Check(Node* node, const AllNodes& all) { ...@@ -1553,7 +1553,6 @@ void Verifier::Visitor::Check(Node* node, const AllNodes& all) {
CheckTypeIs(node, Type::NonInternal()); CheckTypeIs(node, Type::NonInternal());
break; break;
case IrOpcode::kLoadField: case IrOpcode::kLoadField:
case IrOpcode::kLoadMessage:
// Object -> fieldtype // Object -> fieldtype
// TODO(rossberg): activate once machine ops are typed. // TODO(rossberg): activate once machine ops are typed.
// CheckValueInputIs(node, 0, Type::Object()); // CheckValueInputIs(node, 0, Type::Object());
...@@ -1571,7 +1570,6 @@ void Verifier::Visitor::Check(Node* node, const AllNodes& all) { ...@@ -1571,7 +1570,6 @@ void Verifier::Visitor::Check(Node* node, const AllNodes& all) {
case IrOpcode::kLoadDataViewElement: case IrOpcode::kLoadDataViewElement:
break; break;
case IrOpcode::kStoreField: case IrOpcode::kStoreField:
case IrOpcode::kStoreMessage:
// (Object, fieldtype) -> _|_ // (Object, fieldtype) -> _|_
// TODO(rossberg): activate once machine ops are typed. // TODO(rossberg): activate once machine ops are typed.
// CheckValueInputIs(node, 0, Type::Object()); // CheckValueInputIs(node, 0, Type::Object());
......
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