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 @@ ...@@ -23,6 +23,8 @@
#include "IceOperand.h" #include "IceOperand.h"
#include "IceTargetLowering.h" #include "IceTargetLowering.h"
#include "llvm/Support/Format.h"
namespace Ice { namespace Ice {
namespace { namespace {
...@@ -70,10 +72,13 @@ void dumpLiveRange(const Variable *Var, const Cfg *Func) { ...@@ -70,10 +72,13 @@ void dumpLiveRange(const Variable *Var, const Cfg *Func) {
if (!BuildDefs::dump()) if (!BuildDefs::dump())
return; return;
Ostream &Str = Func->getContext()->getStrDump(); Ostream &Str = Func->getContext()->getStrDump();
char buf[30]; Str << "R=";
snprintf(buf, llvm::array_lengthof(buf), "%2u", if (Var->hasRegTmp()) {
unsigned(Var->getRegNumTmp())); Str << llvm::format("%2d", Var->getRegNumTmp());
Str << "R=" << buf << " V="; } else {
Str << "NA";
}
Str << " V=";
Var->dump(Func); Var->dump(Func);
Str << " Range=" << Var->getLiveRange(); 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