Commit 7dc6afd4 authored by Santiago Aboy Solanes's avatar Santiago Aboy Solanes Committed by Commit Bot

[ptr-compr][turbofan] Removing LoadStackArgument simplified operator

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

I am keeping the access builder since that seems useful to have (as
opposed to building the access builder in the implementation).

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, v8:9206
Change-Id: I7c38b090190aa1c3e91c5ab9f729588aeae2dc1b
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1594439
Commit-Queue: Santiago Aboy Solanes <solanes@chromium.org>
Reviewed-by: 's avatarMichael Stanton <mvstanton@chromium.org>
Reviewed-by: 's avatarJaroslav Sevcik <jarin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#61371}
parent 80451b07
...@@ -964,7 +964,7 @@ ElementAccess AccessBuilder::ForStackArgument() { ...@@ -964,7 +964,7 @@ ElementAccess AccessBuilder::ForStackArgument() {
ElementAccess access = { ElementAccess access = {
kUntaggedBase, kUntaggedBase,
CommonFrameConstants::kFixedFrameSizeAboveFp - kSystemPointerSize, CommonFrameConstants::kFixedFrameSizeAboveFp - kSystemPointerSize,
Type::NonInternal(), MachineType::Pointer(), Type::NonInternal(), MachineType::AnyTagged(),
WriteBarrierKind::kNoWriteBarrier}; WriteBarrierKind::kNoWriteBarrier};
return access; return access;
} }
......
...@@ -1007,9 +1007,6 @@ bool EffectControlLinearizer::TryWireInStateEffect(Node* node, ...@@ -1007,9 +1007,6 @@ bool EffectControlLinearizer::TryWireInStateEffect(Node* node,
case IrOpcode::kLoadDataViewElement: case IrOpcode::kLoadDataViewElement:
result = LowerLoadDataViewElement(node); result = LowerLoadDataViewElement(node);
break; break;
case IrOpcode::kLoadStackArgument:
result = LowerLoadStackArgument(node);
break;
case IrOpcode::kStoreTypedElement: case IrOpcode::kStoreTypedElement:
LowerStoreTypedElement(node); LowerStoreTypedElement(node);
break; break;
...@@ -4527,16 +4524,6 @@ Node* EffectControlLinearizer::LowerLoadDataViewElement(Node* node) { ...@@ -4527,16 +4524,6 @@ Node* EffectControlLinearizer::LowerLoadDataViewElement(Node* node) {
return done.PhiAt(0); return done.PhiAt(0);
} }
Node* EffectControlLinearizer::LowerLoadStackArgument(Node* node) {
Node* base = node->InputAt(0);
Node* index = node->InputAt(1);
Node* argument =
__ LoadElement(AccessBuilder::ForStackArgument(), base, index);
return __ BitcastWordToTagged(argument);
}
void EffectControlLinearizer::LowerStoreDataViewElement(Node* node) { void EffectControlLinearizer::LowerStoreDataViewElement(Node* node) {
ExternalArrayType element_type = ExternalArrayTypeOf(node->op()); ExternalArrayType element_type = ExternalArrayTypeOf(node->op());
Node* buffer = node->InputAt(0); Node* buffer = node->InputAt(0);
......
...@@ -174,7 +174,6 @@ class V8_EXPORT_PRIVATE EffectControlLinearizer { ...@@ -174,7 +174,6 @@ class V8_EXPORT_PRIVATE EffectControlLinearizer {
Node* LowerLoadFieldByIndex(Node* node); Node* LowerLoadFieldByIndex(Node* node);
Node* LowerLoadTypedElement(Node* node); Node* LowerLoadTypedElement(Node* node);
Node* LowerLoadDataViewElement(Node* node); Node* LowerLoadDataViewElement(Node* node);
Node* LowerLoadStackArgument(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);
......
...@@ -326,8 +326,9 @@ void EscapeAnalysisReducer::Finalize() { ...@@ -326,8 +326,9 @@ void EscapeAnalysisReducer::Finalize() {
TypeCache::Get()->kArgumentsLengthType); TypeCache::Get()->kArgumentsLengthType);
NodeProperties::ReplaceValueInput(load, arguments_frame, 0); NodeProperties::ReplaceValueInput(load, arguments_frame, 0);
NodeProperties::ReplaceValueInput(load, offset, 1); NodeProperties::ReplaceValueInput(load, offset, 1);
NodeProperties::ChangeOp( NodeProperties::ChangeOp(load,
load, jsgraph()->simplified()->LoadStackArgument()); jsgraph()->simplified()->LoadElement(
AccessBuilder::ForStackArgument()));
break; break;
} }
case IrOpcode::kLoadField: { case IrOpcode::kLoadField: {
......
...@@ -6,6 +6,7 @@ ...@@ -6,6 +6,7 @@
#define V8_COMPILER_ESCAPE_ANALYSIS_REDUCER_H_ #define V8_COMPILER_ESCAPE_ANALYSIS_REDUCER_H_
#include "src/base/compiler-specific.h" #include "src/base/compiler-specific.h"
#include "src/compiler/access-builder.h"
#include "src/compiler/escape-analysis.h" #include "src/compiler/escape-analysis.h"
#include "src/compiler/graph-reducer.h" #include "src/compiler/graph-reducer.h"
#include "src/globals.h" #include "src/globals.h"
......
...@@ -413,7 +413,6 @@ ...@@ -413,7 +413,6 @@
V(LoadElement) \ V(LoadElement) \
V(LoadTypedElement) \ V(LoadTypedElement) \
V(LoadDataViewElement) \ V(LoadDataViewElement) \
V(LoadStackArgument) \
V(StoreField) \ V(StoreField) \
V(StoreElement) \ V(StoreElement) \
V(StoreTypedElement) \ V(StoreTypedElement) \
......
...@@ -2821,11 +2821,6 @@ class RepresentationSelector { ...@@ -2821,11 +2821,6 @@ class RepresentationSelector {
access.machine_type.representation()); access.machine_type.representation());
return; return;
} }
case IrOpcode::kLoadStackArgument: {
if (truncation.IsUnused()) return VisitUnused(node);
VisitBinop(node, UseInfo::Word(), MachineRepresentation::kTagged);
return;
}
case IrOpcode::kStoreElement: { case IrOpcode::kStoreElement: {
ElementAccess access = ElementAccessOf(node->op()); ElementAccess access = ElementAccessOf(node->op());
Node* value_node = node->InputAt(2); Node* value_node = node->InputAt(2);
......
...@@ -1108,17 +1108,6 @@ struct SimplifiedOperatorGlobalCache final { ...@@ -1108,17 +1108,6 @@ struct SimplifiedOperatorGlobalCache final {
}; };
LoadFieldByIndexOperator kLoadFieldByIndex; LoadFieldByIndexOperator kLoadFieldByIndex;
struct LoadStackArgumentOperator final : public Operator {
LoadStackArgumentOperator()
: Operator( // --
IrOpcode::kLoadStackArgument, // opcode
Operator::kNoDeopt | Operator::kNoThrow |
Operator::kNoWrite, // flags
"LoadStackArgument", // name
2, 1, 1, 1, 1, 0) {} // counts
};
LoadStackArgumentOperator kLoadStackArgument;
#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> { \
...@@ -1711,10 +1700,6 @@ SPECULATIVE_NUMBER_BINOP_LIST(SPECULATIVE_NUMBER_BINOP) ...@@ -1711,10 +1700,6 @@ SPECULATIVE_NUMBER_BINOP_LIST(SPECULATIVE_NUMBER_BINOP)
ACCESS_OP_LIST(ACCESS) ACCESS_OP_LIST(ACCESS)
#undef ACCESS #undef ACCESS
const Operator* SimplifiedOperatorBuilder::LoadStackArgument() {
return &cache_.kLoadStackArgument;
}
const Operator* SimplifiedOperatorBuilder::TransitionAndStoreElement( const Operator* SimplifiedOperatorBuilder::TransitionAndStoreElement(
Handle<Map> double_map, Handle<Map> fast_map) { Handle<Map> double_map, Handle<Map> fast_map) {
TransitionAndStoreElementParameters parameters(double_map, fast_map); TransitionAndStoreElementParameters parameters(double_map, fast_map);
......
...@@ -809,9 +809,6 @@ class V8_EXPORT_PRIVATE SimplifiedOperatorBuilder final ...@@ -809,9 +809,6 @@ class V8_EXPORT_PRIVATE SimplifiedOperatorBuilder final
// load-element [base + index] // load-element [base + index]
const Operator* LoadElement(ElementAccess const&); const Operator* LoadElement(ElementAccess const&);
// load-stack-argument [base + index]
const Operator* LoadStackArgument();
// store-element [base + index], value // store-element [base + index], value
const Operator* StoreElement(ElementAccess const&); const Operator* StoreElement(ElementAccess const&);
......
...@@ -2155,10 +2155,6 @@ Type Typer::Visitor::TypeLoadElement(Node* node) { ...@@ -2155,10 +2155,6 @@ Type Typer::Visitor::TypeLoadElement(Node* node) {
return ElementAccessOf(node->op()).type; return ElementAccessOf(node->op()).type;
} }
Type Typer::Visitor::TypeLoadStackArgument(Node* node) {
return Type::NonInternal();
}
Type Typer::Visitor::TypeLoadTypedElement(Node* node) { Type Typer::Visitor::TypeLoadTypedElement(Node* node) {
switch (ExternalArrayTypeOf(node->op())) { switch (ExternalArrayTypeOf(node->op())) {
#define TYPED_ARRAY_CASE(ElemType, type, TYPE, ctype) \ #define TYPED_ARRAY_CASE(ElemType, type, TYPE, ctype) \
......
...@@ -1559,7 +1559,6 @@ void Verifier::Visitor::Check(Node* node, const AllNodes& all) { ...@@ -1559,7 +1559,6 @@ void Verifier::Visitor::Check(Node* node, const AllNodes& all) {
// CheckTypeIs(node, FieldAccessOf(node->op()).type)); // CheckTypeIs(node, FieldAccessOf(node->op()).type));
break; break;
case IrOpcode::kLoadElement: case IrOpcode::kLoadElement:
case IrOpcode::kLoadStackArgument:
// Object -> elementtype // Object -> elementtype
// 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());
......
...@@ -431,6 +431,7 @@ V8_EXPORT_PRIVATE inline int ElementSizeLog2Of(MachineRepresentation rep) { ...@@ -431,6 +431,7 @@ V8_EXPORT_PRIVATE inline int ElementSizeLog2Of(MachineRepresentation rep) {
case MachineRepresentation::kTaggedSigned: case MachineRepresentation::kTaggedSigned:
case MachineRepresentation::kTaggedPointer: case MachineRepresentation::kTaggedPointer:
case MachineRepresentation::kTagged: case MachineRepresentation::kTagged:
return kSystemPointerSizeLog2;
case MachineRepresentation::kCompressedSigned: case MachineRepresentation::kCompressedSigned:
case MachineRepresentation::kCompressedPointer: case MachineRepresentation::kCompressedPointer:
case MachineRepresentation::kCompressed: case MachineRepresentation::kCompressed:
......
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