Commit c5dd9f40 authored by Michael Starzinger's avatar Michael Starzinger Committed by Commit Bot

[turbofan] Use std::setw to print instruction block.

R=jarin@chromium.org

Change-Id: I369684ee6ccff83329bcc4f463b922e0263ae0b0
Reviewed-on: https://chromium-review.googlesource.com/1105823Reviewed-by: 's avatarJaroslav Sevcik <jarin@chromium.org>
Commit-Queue: Michael Starzinger <mstarzinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53834}
parent e69b8f89
......@@ -4,6 +4,8 @@
#include "src/compiler/instruction.h"
#include <iomanip>
#include "src/compiler/common-operator.h"
#include "src/compiler/graph.h"
#include "src/compiler/schedule.h"
......@@ -722,15 +724,12 @@ std::ostream& operator<<(std::ostream& os,
os << std::endl;
}
ScopedVector<char> buf(32);
PrintableInstruction printable_instr;
printable_instr.register_configuration_ = config;
for (int j = block->first_instruction_index();
j <= block->last_instruction_index(); j++) {
// TODO(svenpanne) Add some basic formatting to our streams.
SNPrintF(buf, "%5d", j);
printable_instr.instr_ = code->InstructionAt(j);
os << " " << buf.start() << ": " << printable_instr << std::endl;
os << " " << std::setw(5) << j << ": " << printable_instr << std::endl;
}
for (RpoNumber succ : block->successors()) {
......
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