Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(15)

Unified Diff: src/IceCfgNode.cpp

Issue 1676123002: Subzero: Use a proper RegNumT type instead of int32_t/SizeT. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Make it possible to do "auto NewReg = RegNumT::NoRegister;" Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/IceAssemblerARM32.cpp ('k') | src/IceInstARM32.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/IceCfgNode.cpp
diff --git a/src/IceCfgNode.cpp b/src/IceCfgNode.cpp
index 647da89956cec991782e12fa191ed64688043bf2..9dbe7df11440610c2484cae8b1e9fc0322945fa3 100644
--- a/src/IceCfgNode.cpp
+++ b/src/IceCfgNode.cpp
@@ -338,8 +338,8 @@ bool sameVarOrReg(TargetLowering *Target, const Variable *Var1,
if (!Var2->hasReg())
return false;
- int32_t RegNum1 = Var1->getRegNum();
- int32_t RegNum2 = Var2->getRegNum();
+ const auto RegNum1 = Var1->getRegNum();
+ const auto RegNum2 = Var2->getRegNum();
// Quick common-case check.
if (RegNum1 == RegNum2)
return true;
@@ -920,8 +920,8 @@ void emitRegisterUsage(Ostream &Str, const Cfg *Func, const CfgNode *Node,
return;
Liveness *Liveness = Func->getLiveness();
const LivenessBV *Live;
- const int32_t StackReg = Func->getTarget()->getStackReg();
- const int32_t FrameOrStackReg = Func->getTarget()->getFrameOrStackReg();
+ const auto StackReg = Func->getTarget()->getStackReg();
+ const auto FrameOrStackReg = Func->getTarget()->getFrameOrStackReg();
if (IsLiveIn) {
Live = &Liveness->getLiveIn(Node);
Str << "\t\t\t\t/* LiveIn=";
@@ -937,7 +937,7 @@ void emitRegisterUsage(Ostream &Str, const Cfg *Func, const CfgNode *Node,
Variable *Var = Liveness->getVariable(i, Node);
if (!Var->hasReg())
continue;
- const int32_t RegNum = Var->getRegNum();
+ const auto RegNum = Var->getRegNum();
if (RegNum == StackReg || RegNum == FrameOrStackReg)
continue;
if (IsLiveIn)
@@ -948,7 +948,7 @@ void emitRegisterUsage(Ostream &Str, const Cfg *Func, const CfgNode *Node,
// order.
std::sort(LiveRegs.begin(), LiveRegs.end(),
[](const Variable *V1, const Variable *V2) {
- return V1->getRegNum() < V2->getRegNum();
+ return unsigned(V1->getRegNum()) < unsigned(V2->getRegNum());
});
bool First = true;
for (Variable *Var : LiveRegs) {
« no previous file with comments | « src/IceAssemblerARM32.cpp ('k') | src/IceInstARM32.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698