Commit 3cee9806 authored by Clemens Backes's avatar Clemens Backes Committed by V8 LUCI CQ

[compiler][cleanup] Nicer printing of gap moves

Avoid the trailing ";" after the last parallel gap move. Instead, make the
semicolon part of the delimiter between moves.

Before:
gap ([stack:8|w32] = [constant:0];) ([edi|R|w32] = [constant:7]; [edx|R|w32] = [constant:8];)
After:
gap ([stack:8|w32] = [constant:0]) ([edi|R|w32] = [constant:7]; [edx|R|w32] = [constant:8])

R=mslekova@chromium.org

Bug: v8:12330
Change-Id: If9f3d67f09e48f717e839fa7fb8968f20bb58b16
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3347820Reviewed-by: 's avatarMaya Lekova <mslekova@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/main@{#78407}
parent 7849465f
......@@ -284,7 +284,7 @@ std::ostream& operator<<(std::ostream& os, const MoveOperands& mo) {
if (!mo.source().Equals(mo.destination())) {
os << " = " << mo.source();
}
return os << ";";
return os;
}
bool ParallelMove::IsRedundant() const {
......@@ -373,11 +373,11 @@ bool Instruction::AreMovesRedundant() const {
void Instruction::Print() const { StdoutStream{} << *this << std::endl; }
std::ostream& operator<<(std::ostream& os, const ParallelMove& pm) {
const char* space = "";
const char* delimiter = "";
for (MoveOperands* move : pm) {
if (move->IsEliminated()) continue;
os << space << *move;
space = " ";
os << delimiter << *move;
delimiter = "; ";
}
return os;
}
......
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