From 8881fac82e662c94e7aa8e7a50a20095f80f5a7f Mon Sep 17 00:00:00 2001 From: Santiago Aboy Solanes Date: Thu, 18 Jul 2019 17:33:37 +0100 Subject: [PATCH] [ptr-compr] Specialize decompression with known Machine Representation If we already know it has CompressedPointer representation, let's use that information to decompress more efficiently. 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:7703 Change-Id: I3591bf67a7c0369c40ca6e7af16183530f8cd269 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1709049 Reviewed-by: Sigurd Schneider Commit-Queue: Santiago Aboy Solanes Cr-Commit-Position: refs/heads/master@{#62887} --- src/compiler/representation-change.cc | 8 +++++++- src/compiler/representation-change.h | 1 + 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/src/compiler/representation-change.cc b/src/compiler/representation-change.cc index 7a4577b799..e295a3d4c2 100644 --- a/src/compiler/representation-change.cc +++ b/src/compiler/representation-change.cc @@ -475,7 +475,7 @@ Node* RepresentationChanger::GetTaggedPointerRepresentationFor( } else if (output_rep == MachineRepresentation::kCompressedPointer) { if (use_info.type_check() == TypeCheckKind::kBigInt && !output_type.Is(Type::BigInt())) { - node = InsertChangeCompressedToTagged(node); + node = InsertChangeCompressedPointerToTaggedPointer(node); op = simplified()->CheckBigInt(use_info.feedback()); } else { op = machine()->ChangeCompressedPointerToTaggedPointer(); @@ -1741,6 +1741,12 @@ Node* RepresentationChanger::InsertTruncateInt64ToInt32(Node* node) { return jsgraph()->graph()->NewNode(machine()->TruncateInt64ToInt32(), node); } +Node* RepresentationChanger::InsertChangeCompressedPointerToTaggedPointer( + Node* node) { + return jsgraph()->graph()->NewNode(machine()->ChangeCompressedToTagged(), + node); +} + Node* RepresentationChanger::InsertChangeCompressedToTagged(Node* node) { return jsgraph()->graph()->NewNode(machine()->ChangeCompressedToTagged(), node); diff --git a/src/compiler/representation-change.h b/src/compiler/representation-change.h index d338667603..334cac9535 100644 --- a/src/compiler/representation-change.h +++ b/src/compiler/representation-change.h @@ -395,6 +395,7 @@ class V8_EXPORT_PRIVATE RepresentationChanger final { Node* InsertChangeTaggedSignedToInt32(Node* node); Node* InsertChangeTaggedToFloat64(Node* node); Node* InsertChangeUint32ToFloat64(Node* node); + Node* InsertChangeCompressedPointerToTaggedPointer(Node* node); Node* InsertChangeCompressedToTagged(Node* node); Node* InsertConversion(Node* node, const Operator* op, Node* use_node); Node* InsertTruncateInt64ToInt32(Node* node);