compiler/arm64: change nops to use EmitIdentity

This affects VisitChangeUint32ToUint64 and VisitTruncateInt64ToInt32.

The geometric mean of changes across octane, ares6-1.0.1, jetstream2,
and web-tooling-0.5.3, was an improvement of 1.2% when running on a
Cortex-A53.

Change-Id: Ib551641fb78ce4060100129e12f23cd02b0b3b27
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1669690
Reviewed-by: Sigurd Schneider <sigurds@chromium.org>
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
Cr-Commit-Position: refs/heads/master@{#62327}
This commit is contained in:
Stephen Kyle 2019-06-20 16:43:18 +01:00 committed by Commit Bot
parent 7e5d6304cd
commit 6ddbb54fc2

View File

@ -1599,7 +1599,7 @@ void InstructionSelector::VisitChangeUint32ToUint64(Node* node) {
// 32-bit operations will write their result in a W register (implicitly // 32-bit operations will write their result in a W register (implicitly
// clearing the top 32-bit of the corresponding X register) so the // clearing the top 32-bit of the corresponding X register) so the
// zero-extension is a no-op. // zero-extension is a no-op.
Emit(kArchNop, g.DefineSameAsFirst(node), g.Use(value)); EmitIdentity(node);
return; return;
} }
case IrOpcode::kLoad: { case IrOpcode::kLoad: {
@ -1610,7 +1610,7 @@ void InstructionSelector::VisitChangeUint32ToUint64(Node* node) {
case MachineRepresentation::kWord8: case MachineRepresentation::kWord8:
case MachineRepresentation::kWord16: case MachineRepresentation::kWord16:
case MachineRepresentation::kWord32: case MachineRepresentation::kWord32:
Emit(kArchNop, g.DefineSameAsFirst(node), g.Use(value)); EmitIdentity(node);
return; return;
default: default:
break; break;
@ -1665,10 +1665,9 @@ void InstructionSelector::VisitChangeCompressedSignedToTaggedSigned(
void InstructionSelector::VisitTruncateInt64ToInt32(Node* node) { void InstructionSelector::VisitTruncateInt64ToInt32(Node* node) {
Arm64OperandGenerator g(this); Arm64OperandGenerator g(this);
Node* value = node->InputAt(0);
// The top 32 bits in the 64-bit register will be undefined, and // The top 32 bits in the 64-bit register will be undefined, and
// must not be used by a dependent node. // must not be used by a dependent node.
Emit(kArchNop, g.DefineSameAsFirst(node), g.UseRegister(value)); EmitIdentity(node);
} }
void InstructionSelector::VisitFloat64Mod(Node* node) { void InstructionSelector::VisitFloat64Mod(Node* node) {