[llvm] r323114 - Fixing warnings caused by commit 323095
Marina Yatsina via llvm-commits
llvm-commits at lists.llvm.org
Mon Jan 22 05:24:10 PST 2018
Author: myatsina
Date: Mon Jan 22 05:24:10 2018
New Revision: 323114
URL: http://llvm.org/viewvc/llvm-project?rev=323114&view=rev
Log:
Fixing warnings caused by commit 323095
Change-Id: I4e1f81db2f5382a820f4016c23b243e4d5aebf51
Modified:
llvm/trunk/lib/CodeGen/ExecutionDomainFix.cpp
llvm/trunk/lib/CodeGen/LoopTraversal.cpp
llvm/trunk/lib/CodeGen/ReachingDefAnalysis.cpp
Modified: llvm/trunk/lib/CodeGen/ExecutionDomainFix.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/ExecutionDomainFix.cpp?rev=323114&r1=323113&r2=323114&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/ExecutionDomainFix.cpp (original)
+++ llvm/trunk/lib/CodeGen/ExecutionDomainFix.cpp Mon Jan 22 05:24:10 2018
@@ -167,7 +167,7 @@ void ExecutionDomainFix::enterBasicBlock
// Try to coalesce live-out registers from predecessors.
for (MachineBasicBlock *pred : MBB->predecessors()) {
- assert(pred->getNumber() < MBBOutRegsInfos.size() &&
+ assert(unsigned(pred->getNumber()) < MBBOutRegsInfos.size() &&
"Should have pre-allocated MBBInfos for all MBBs");
LiveRegsDVInfo &Incoming = MBBOutRegsInfos[pred->getNumber()];
// Incoming is null if this is a backedge from a BB
@@ -208,7 +208,7 @@ void ExecutionDomainFix::enterBasicBlock
void ExecutionDomainFix::leaveBasicBlock(
const LoopTraversal::TraversedMBBInfo &TraversedMBB) {
assert(!LiveRegs.empty() && "Must enter basic block first.");
- int MBBNumber = TraversedMBB.MBB->getNumber();
+ unsigned MBBNumber = TraversedMBB.MBB->getNumber();
assert(MBBNumber < MBBOutRegsInfos.size() &&
"Unexpected basic block number.");
// Save register clearances at end of MBB - used by enterBasicBlock().
Modified: llvm/trunk/lib/CodeGen/LoopTraversal.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/LoopTraversal.cpp?rev=323114&r1=323113&r2=323114&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/LoopTraversal.cpp (original)
+++ llvm/trunk/lib/CodeGen/LoopTraversal.cpp Mon Jan 22 05:24:10 2018
@@ -14,7 +14,7 @@
using namespace llvm;
bool LoopTraversal::isBlockDone(MachineBasicBlock *MBB) {
- int MBBNumber = MBB->getNumber();
+ unsigned MBBNumber = MBB->getNumber();
assert(MBBNumber < MBBInfos.size() && "Unexpected basic block number.");
return MBBInfos[MBBNumber].PrimaryCompleted &&
MBBInfos[MBBNumber].IncomingCompleted ==
@@ -33,7 +33,7 @@ LoopTraversal::TraversalOrder LoopTraver
for (MachineBasicBlock *MBB : RPOT) {
// N.B: IncomingProcessed and IncomingCompleted were already updated while
// processing this block's predecessors.
- int MBBNumber = MBB->getNumber();
+ unsigned MBBNumber = MBB->getNumber();
assert(MBBNumber < MBBInfos.size() && "Unexpected basic block number.");
MBBInfos[MBBNumber].PrimaryCompleted = true;
MBBInfos[MBBNumber].PrimaryIncoming = MBBInfos[MBBNumber].IncomingProcessed;
@@ -45,7 +45,7 @@ LoopTraversal::TraversalOrder LoopTraver
bool Done = isBlockDone(ActiveMBB);
MBBTraversalOrder.push_back(TraversedMBBInfo(ActiveMBB, Primary, Done));
for (MachineBasicBlock *Succ : ActiveMBB->successors()) {
- int SuccNumber = Succ->getNumber();
+ unsigned SuccNumber = Succ->getNumber();
assert(SuccNumber < MBBInfos.size() &&
"Unexpected basic block number.");
if (!isBlockDone(Succ)) {
Modified: llvm/trunk/lib/CodeGen/ReachingDefAnalysis.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/ReachingDefAnalysis.cpp?rev=323114&r1=323113&r2=323114&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/ReachingDefAnalysis.cpp (original)
+++ llvm/trunk/lib/CodeGen/ReachingDefAnalysis.cpp Mon Jan 22 05:24:10 2018
@@ -23,7 +23,7 @@ void ReachingDefAnalysis::enterBasicBloc
const LoopTraversal::TraversedMBBInfo &TraversedMBB) {
MachineBasicBlock *MBB = TraversedMBB.MBB;
- int MBBNumber = MBB->getNumber();
+ unsigned MBBNumber = MBB->getNumber();
assert(MBBNumber < MBBReachingDefs.size() &&
"Unexpected basic block number.");
MBBReachingDefs[MBBNumber].resize(NumRegUnits);
@@ -53,7 +53,7 @@ void ReachingDefAnalysis::enterBasicBloc
// Try to coalesce live-out registers from predecessors.
for (MachineBasicBlock *pred : MBB->predecessors()) {
- assert(pred->getNumber() < MBBOutRegsInfos.size() &&
+ assert(unsigned(pred->getNumber()) < MBBOutRegsInfos.size() &&
"Should have pre-allocated MBBInfos for all MBBs");
const LiveRegsDefInfo &Incoming = MBBOutRegsInfos[pred->getNumber()];
// Incoming is null if this is a backedge from a BB
@@ -77,7 +77,7 @@ void ReachingDefAnalysis::enterBasicBloc
void ReachingDefAnalysis::leaveBasicBlock(
const LoopTraversal::TraversedMBBInfo &TraversedMBB) {
assert(!LiveRegs.empty() && "Must enter basic block first.");
- int MBBNumber = TraversedMBB.MBB->getNumber();
+ unsigned MBBNumber = TraversedMBB.MBB->getNumber();
assert(MBBNumber < MBBOutRegsInfos.size() &&
"Unexpected basic block number.");
// Save register clearances at end of MBB - used by enterBasicBlock().
@@ -95,7 +95,7 @@ void ReachingDefAnalysis::leaveBasicBloc
void ReachingDefAnalysis::processDefs(MachineInstr *MI) {
assert(!MI->isDebugValue() && "Won't process debug values");
- int MBBNumber = MI->getParent()->getNumber();
+ unsigned MBBNumber = MI->getParent()->getNumber();
assert(MBBNumber < MBBReachingDefs.size() &&
"Unexpected basic block number.");
const MCInstrDesc &MCID = MI->getDesc();
@@ -174,7 +174,7 @@ int ReachingDefAnalysis::getReachingDef(
assert(InstIds.count(MI) && "Unexpected machine instuction.");
int InstId = InstIds[MI];
int DefRes = ReachingDedDefaultVal;
- int MBBNumber = MI->getParent()->getNumber();
+ unsigned MBBNumber = MI->getParent()->getNumber();
assert(MBBNumber < MBBReachingDefs.size() &&
"Unexpected basic block number.");
int LatestDef = ReachingDedDefaultVal;
More information about the llvm-commits
mailing list