[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 <sigurds@chromium.org>
Commit-Queue: Santiago Aboy Solanes <solanes@chromium.org>
Cr-Commit-Position: refs/heads/master@{#62887}
This commit is contained in:
Santiago Aboy Solanes 2019-07-18 17:33:37 +01:00 committed by Commit Bot
parent a2e2ee8775
commit 8881fac82e
2 changed files with 8 additions and 1 deletions

View File

@ -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);

View File

@ -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);