Commit 11756b51 by Jim Stichnoth

Subzero: Dump register numbers as signed quantities.

Undo an overly aggression application of unsigned to register numbers in 8aa39661 (https://codereview.chromium.org/1676123002). Now, instead of -verbose=regalloc output like: ++++++ Unhandled: R=jpp@chromium.org, kschimpf@google.com, 4294967295 V=%__4 Range=[2:7), 4294967295 V=%__5 Range=[7:8), 4294967295 V=%__6 Range=[9:11), -1 V=%__4 Range=[2:7), -1 V=%__5 Range=[7:8), -1 V=%__6 Range=[9:11) we have the originally intended: ++++++ Unhandled: BUG= none Review URL: https://codereview.chromium.org/1868543002 .
parent 2b000fd8
......@@ -23,6 +23,8 @@
#include "IceOperand.h"
#include "IceTargetLowering.h"
#include "llvm/Support/Format.h"
namespace Ice {
namespace {
......@@ -70,10 +72,13 @@ void dumpLiveRange(const Variable *Var, const Cfg *Func) {
if (!BuildDefs::dump())
return;
Ostream &Str = Func->getContext()->getStrDump();
char buf[30];
snprintf(buf, llvm::array_lengthof(buf), "%2u",
unsigned(Var->getRegNumTmp()));
Str << "R=" << buf << " V=";
Str << "R=";
if (Var->hasRegTmp()) {
Str << llvm::format("%2d", Var->getRegNumTmp());
} else {
Str << "NA";
}
Str << " V=";
Var->dump(Func);
Str << " Range=" << Var->getLiveRange();
}
......
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