Revert "[ptr-compr][turbofan] Adding the final compressed access builders"
This reverts commit cb3caa1ea3
.
Reason for revert: Speculative revert, timeouts on Windows https://ci.chromium.org/p/v8/builders/ci/V8%20Win32%20-%20nosnap%20-%20shared/33313
Original change's description:
> [ptr-compr][turbofan] Adding the final compressed access builders
>
> This CL is the final one for the access-builder.cc's changes. There are
> still Tagged loads and stores (e.g in wasm) which will be tackled on
> following CLs.
>
> 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: I2667eaacbada0846fe5f128bb17a1a305862c64d
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1590077
> Commit-Queue: Santiago Aboy Solanes <solanes@chromium.org>
> Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
> Reviewed-by: Michael Stanton <mvstanton@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#61272}
TBR=mvstanton@chromium.org,jarin@chromium.org,solanes@chromium.org
Change-Id: I7c1ba713dc808359b97e6fa8f7afaa87c9daad68
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: v8:8977, v8:7703
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
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1598703
Commit-Queue: Maya Lekova <mslekova@chromium.org>
Reviewed-by: Maya Lekova <mslekova@chromium.org>
Cr-Commit-Position: refs/heads/master@{#61276}
This commit is contained in:
parent
330e5ba26f
commit
c958a1c6ca
@ -43,12 +43,13 @@ FieldAccess AccessBuilder::ForExternalUint8Value() {
|
||||
}
|
||||
|
||||
// static
|
||||
// TODO(v8:8977, v8:7703): Change MachineType::TaggedPointer to
|
||||
// MachineType::TypeCompressedTaggedPointer
|
||||
FieldAccess AccessBuilder::ForMap() {
|
||||
FieldAccess access = {
|
||||
kTaggedBase, HeapObject::kMapOffset,
|
||||
MaybeHandle<Name>(), MaybeHandle<Map>(),
|
||||
Type::OtherInternal(), MachineType::TypeCompressedTaggedPointer(),
|
||||
kMapWriteBarrier};
|
||||
FieldAccess access = {kTaggedBase, HeapObject::kMapOffset,
|
||||
MaybeHandle<Name>(), MaybeHandle<Map>(),
|
||||
Type::OtherInternal(), MachineType::TaggedPointer(),
|
||||
kMapWriteBarrier};
|
||||
return access;
|
||||
}
|
||||
|
||||
@ -83,22 +84,24 @@ FieldAccess AccessBuilder::ForBigIntBitfield() {
|
||||
}
|
||||
|
||||
// static
|
||||
// TODO(v8:8977, v8:7703): Change MachineType::AnyTagged to
|
||||
// MachineType::TypeCompressedTagged
|
||||
FieldAccess AccessBuilder::ForJSObjectPropertiesOrHash() {
|
||||
FieldAccess access = {
|
||||
kTaggedBase, JSObject::kPropertiesOrHashOffset,
|
||||
MaybeHandle<Name>(), MaybeHandle<Map>(),
|
||||
Type::Any(), MachineType::TypeCompressedTagged(),
|
||||
kPointerWriteBarrier, LoadSensitivity::kCritical};
|
||||
FieldAccess access = {kTaggedBase, JSObject::kPropertiesOrHashOffset,
|
||||
MaybeHandle<Name>(), MaybeHandle<Map>(),
|
||||
Type::Any(), MachineType::AnyTagged(),
|
||||
kPointerWriteBarrier, LoadSensitivity::kCritical};
|
||||
return access;
|
||||
}
|
||||
|
||||
// static
|
||||
// TODO(v8:8977, v8:7703): Change MachineType::TaggedPointer to
|
||||
// MachineType::TypeCompressedTaggedPointer
|
||||
FieldAccess AccessBuilder::ForJSObjectElements() {
|
||||
FieldAccess access = {
|
||||
kTaggedBase, JSObject::kElementsOffset,
|
||||
MaybeHandle<Name>(), MaybeHandle<Map>(),
|
||||
Type::Internal(), MachineType::TypeCompressedTaggedPointer(),
|
||||
kPointerWriteBarrier, LoadSensitivity::kCritical};
|
||||
FieldAccess access = {kTaggedBase, JSObject::kElementsOffset,
|
||||
MaybeHandle<Name>(), MaybeHandle<Map>(),
|
||||
Type::Internal(), MachineType::TaggedPointer(),
|
||||
kPointerWriteBarrier, LoadSensitivity::kCritical};
|
||||
return access;
|
||||
}
|
||||
|
||||
@ -667,12 +670,13 @@ FieldAccess AccessBuilder::ForStringLength() {
|
||||
}
|
||||
|
||||
// static
|
||||
// TODO(v8:8977, v8:7703): Change MachineType::TaggedPointer to
|
||||
// MachineType::TypeCompressedTaggedPointer
|
||||
FieldAccess AccessBuilder::ForConsStringFirst() {
|
||||
FieldAccess access = {
|
||||
kTaggedBase, ConsString::kFirstOffset,
|
||||
Handle<Name>(), MaybeHandle<Map>(),
|
||||
Type::String(), MachineType::TypeCompressedTaggedPointer(),
|
||||
kPointerWriteBarrier};
|
||||
FieldAccess access = {kTaggedBase, ConsString::kFirstOffset,
|
||||
Handle<Name>(), MaybeHandle<Map>(),
|
||||
Type::String(), MachineType::TaggedPointer(),
|
||||
kPointerWriteBarrier};
|
||||
return access;
|
||||
}
|
||||
|
||||
@ -687,12 +691,13 @@ FieldAccess AccessBuilder::ForConsStringSecond() {
|
||||
}
|
||||
|
||||
// static
|
||||
// TODO(v8:8977, v8:7703): Change MachineType::TaggedPointer to
|
||||
// MachineType::TypeCompressedTaggedPointer
|
||||
FieldAccess AccessBuilder::ForThinStringActual() {
|
||||
FieldAccess access = {
|
||||
kTaggedBase, ThinString::kActualOffset,
|
||||
Handle<Name>(), MaybeHandle<Map>(),
|
||||
Type::String(), MachineType::TypeCompressedTaggedPointer(),
|
||||
kPointerWriteBarrier};
|
||||
FieldAccess access = {kTaggedBase, ThinString::kActualOffset,
|
||||
Handle<Name>(), MaybeHandle<Map>(),
|
||||
Type::String(), MachineType::TaggedPointer(),
|
||||
kPointerWriteBarrier};
|
||||
return access;
|
||||
}
|
||||
|
||||
@ -707,12 +712,13 @@ FieldAccess AccessBuilder::ForSlicedStringOffset() {
|
||||
}
|
||||
|
||||
// static
|
||||
// TODO(v8:8977, v8:7703): Change MachineType::TaggedPointer to
|
||||
// MachineType::TypeCompressedTaggedPointer
|
||||
FieldAccess AccessBuilder::ForSlicedStringParent() {
|
||||
FieldAccess access = {
|
||||
kTaggedBase, SlicedString::kParentOffset,
|
||||
Handle<Name>(), MaybeHandle<Map>(),
|
||||
Type::String(), MachineType::TypeCompressedTaggedPointer(),
|
||||
kPointerWriteBarrier};
|
||||
FieldAccess access = {kTaggedBase, SlicedString::kParentOffset,
|
||||
Handle<Name>(), MaybeHandle<Map>(),
|
||||
Type::String(), MachineType::TaggedPointer(),
|
||||
kPointerWriteBarrier};
|
||||
return access;
|
||||
}
|
||||
|
||||
@ -779,11 +785,13 @@ FieldAccess AccessBuilder::ForJSGlobalObjectNativeContext() {
|
||||
}
|
||||
|
||||
// static
|
||||
// TODO(v8:8977, v8:7703): Change MachineType::TaggedPointer to
|
||||
// MachineType::TypeCompressedTaggedPointer
|
||||
FieldAccess AccessBuilder::ForJSGlobalProxyNativeContext() {
|
||||
FieldAccess access = {
|
||||
kTaggedBase, JSGlobalProxy::kNativeContextOffset,
|
||||
Handle<Name>(), MaybeHandle<Map>(),
|
||||
Type::Internal(), MachineType::TypeCompressedTaggedPointer(),
|
||||
Type::Internal(), MachineType::TaggedPointer(),
|
||||
kPointerWriteBarrier};
|
||||
return access;
|
||||
}
|
||||
@ -913,10 +921,11 @@ FieldAccess AccessBuilder::ForContextSlot(size_t index) {
|
||||
}
|
||||
|
||||
// static
|
||||
// TODO(v8:8977, v8:7703): Change MachineType::AnyTagged to
|
||||
// MachineType::TypeCompressedTagged
|
||||
ElementAccess AccessBuilder::ForFixedArrayElement() {
|
||||
ElementAccess access = {kTaggedBase, FixedArray::kHeaderSize, Type::Any(),
|
||||
MachineType::TypeCompressedTagged(),
|
||||
kFullWriteBarrier};
|
||||
MachineType::AnyTagged(), kFullWriteBarrier};
|
||||
return access;
|
||||
}
|
||||
|
||||
|
@ -112,26 +112,20 @@ Node* GraphAssembler::Allocate(AllocationType allocation, Node* size) {
|
||||
}
|
||||
|
||||
Node* GraphAssembler::LoadField(FieldAccess const& access, Node* object) {
|
||||
Node* value = current_effect_ =
|
||||
graph()->NewNode(simplified()->LoadField(access), object, current_effect_,
|
||||
current_control_);
|
||||
return InsertDecompressionIfNeeded(access.machine_type.representation(),
|
||||
value);
|
||||
return current_effect_ =
|
||||
graph()->NewNode(simplified()->LoadField(access), object,
|
||||
current_effect_, current_control_);
|
||||
}
|
||||
|
||||
Node* GraphAssembler::LoadElement(ElementAccess const& access, Node* object,
|
||||
Node* index) {
|
||||
Node* value = current_effect_ =
|
||||
graph()->NewNode(simplified()->LoadElement(access), object, index,
|
||||
current_effect_, current_control_);
|
||||
return InsertDecompressionIfNeeded(access.machine_type.representation(),
|
||||
value);
|
||||
return current_effect_ =
|
||||
graph()->NewNode(simplified()->LoadElement(access), object, index,
|
||||
current_effect_, current_control_);
|
||||
}
|
||||
|
||||
Node* GraphAssembler::StoreField(FieldAccess const& access, Node* object,
|
||||
Node* value) {
|
||||
value =
|
||||
InsertCompressionIfNeeded(access.machine_type.representation(), value);
|
||||
return current_effect_ =
|
||||
graph()->NewNode(simplified()->StoreField(access), object, value,
|
||||
current_effect_, current_control_);
|
||||
@ -139,8 +133,6 @@ Node* GraphAssembler::StoreField(FieldAccess const& access, Node* object,
|
||||
|
||||
Node* GraphAssembler::StoreElement(ElementAccess const& access, Node* object,
|
||||
Node* index, Node* value) {
|
||||
value =
|
||||
InsertCompressionIfNeeded(access.machine_type.representation(), value);
|
||||
return current_effect_ =
|
||||
graph()->NewNode(simplified()->StoreElement(access), object, index,
|
||||
value, current_effect_, current_control_);
|
||||
@ -282,50 +274,6 @@ Node* GraphAssembler::ExtractCurrentEffect() {
|
||||
return result;
|
||||
}
|
||||
|
||||
Node* GraphAssembler::InsertDecompressionIfNeeded(MachineRepresentation rep,
|
||||
Node* value) {
|
||||
if (COMPRESS_POINTERS_BOOL) {
|
||||
switch (rep) {
|
||||
case MachineRepresentation::kCompressedPointer:
|
||||
value = graph()->NewNode(
|
||||
machine()->ChangeCompressedPointerToTaggedPointer(), value);
|
||||
break;
|
||||
case MachineRepresentation::kCompressedSigned:
|
||||
value = graph()->NewNode(
|
||||
machine()->ChangeCompressedSignedToTaggedSigned(), value);
|
||||
break;
|
||||
case MachineRepresentation::kCompressed:
|
||||
value = graph()->NewNode(machine()->ChangeCompressedToTagged(), value);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
return value;
|
||||
}
|
||||
|
||||
Node* GraphAssembler::InsertCompressionIfNeeded(MachineRepresentation rep,
|
||||
Node* value) {
|
||||
if (COMPRESS_POINTERS_BOOL) {
|
||||
switch (rep) {
|
||||
case MachineRepresentation::kCompressedPointer:
|
||||
value = graph()->NewNode(
|
||||
machine()->ChangeTaggedPointerToCompressedPointer(), value);
|
||||
break;
|
||||
case MachineRepresentation::kCompressedSigned:
|
||||
value = graph()->NewNode(
|
||||
machine()->ChangeTaggedSignedToCompressedSigned(), value);
|
||||
break;
|
||||
case MachineRepresentation::kCompressed:
|
||||
value = graph()->NewNode(machine()->ChangeTaggedToCompressed(), value);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
return value;
|
||||
}
|
||||
|
||||
void GraphAssembler::Reset(Node* effect, Node* control) {
|
||||
current_effect_ = effect;
|
||||
current_control_ = control;
|
||||
|
@ -284,12 +284,6 @@ class GraphAssembler {
|
||||
Node* ExtractCurrentEffect();
|
||||
|
||||
private:
|
||||
// Adds a decompression node if pointer compression is enabled and the
|
||||
// representation loaded is a compressed one. To be used after loads.
|
||||
Node* InsertDecompressionIfNeeded(MachineRepresentation rep, Node* value);
|
||||
// Adds a compression node if pointer compression is enabled and the
|
||||
// representation to be stored is a compressed one. To be used before stores.
|
||||
Node* InsertCompressionIfNeeded(MachineRepresentation rep, Node* value);
|
||||
template <typename... Vars>
|
||||
void MergeState(GraphAssemblerLabel<sizeof...(Vars)>* label, Vars... vars);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user