basic_block: Add inst address and use count to DumpBlock
This additional output assists with debugging.
This commit is contained in:
parent
e53d00905f
commit
6776f83a0c
@ -172,6 +172,7 @@ std::string DumpBlock(const IR::Block& block) {
|
||||
for (const auto& inst : block) {
|
||||
const Opcode op = inst.GetOpcode();
|
||||
|
||||
ret += fmt::format("[{:016x}] ", reinterpret_cast<u64>(&inst));
|
||||
if (GetTypeOf(op) != Type::Void) {
|
||||
ret += fmt::format("%{:<5} = ", index);
|
||||
} else {
|
||||
@ -194,6 +195,8 @@ std::string DumpBlock(const IR::Block& block) {
|
||||
}
|
||||
}
|
||||
|
||||
ret += fmt::format(" (uses: {})", inst.UseCount());
|
||||
|
||||
ret += '\n';
|
||||
inst_to_index[&inst] = index++;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user