[llvm] r254311 - [WebAssembly] Fix a few minor compiler warnings. NFC.
Dan Gohman via llvm-commits
llvm-commits at lists.llvm.org
Mon Nov 30 10:42:09 PST 2015
Author: djg
Date: Mon Nov 30 12:42:08 2015
New Revision: 254311
URL: http://llvm.org/viewvc/llvm-project?rev=254311&view=rev
Log:
[WebAssembly] Fix a few minor compiler warnings. NFC.
Modified:
llvm/trunk/lib/Target/WebAssembly/WebAssemblyCFGStackify.cpp
Modified: llvm/trunk/lib/Target/WebAssembly/WebAssemblyCFGStackify.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/WebAssembly/WebAssemblyCFGStackify.cpp?rev=254311&r1=254310&r2=254311&view=diff
==============================================================================
--- llvm/trunk/lib/Target/WebAssembly/WebAssemblyCFGStackify.cpp (original)
+++ llvm/trunk/lib/Target/WebAssembly/WebAssemblyCFGStackify.cpp Mon Nov 30 12:42:08 2015
@@ -162,9 +162,9 @@ static void SortBlocks(MachineFunction &
SmallPtrSet<MachineBasicBlock *, 16> Visited;
SmallVector<POStackEntry, 16> Stack;
- MachineBasicBlock *Entry = &*MF.begin();
- Visited.insert(Entry);
- Stack.push_back(POStackEntry(Entry, MF, MLI));
+ MachineBasicBlock *EntryBlock = &*MF.begin();
+ Visited.insert(EntryBlock);
+ Stack.push_back(POStackEntry(EntryBlock, MF, MLI));
for (;;) {
POStackEntry &Entry = Stack.back();
@@ -220,7 +220,7 @@ static void SortBlocks(MachineFunction &
#endif
}
-static int GetLoopDepth(const MachineLoop *Loop) {
+static unsigned GetLoopDepth(const MachineLoop *Loop) {
return Loop ? Loop->getLoopDepth() : 0;
}
@@ -249,12 +249,12 @@ static void PlaceBlockMarkers(MachineBas
MachineBasicBlock::iterator InsertPos;
MachineLoop *HeaderLoop = MLI.getLoopFor(Header);
- int MBBLoopDepth = GetLoopDepth(MLI.getLoopFor(&MBB));
- int HeaderLoopDepth = GetLoopDepth(HeaderLoop);
+ unsigned MBBLoopDepth = GetLoopDepth(MLI.getLoopFor(&MBB));
+ unsigned HeaderLoopDepth = GetLoopDepth(HeaderLoop);
if (HeaderLoopDepth > MBBLoopDepth) {
// The nearest common dominating point is more deeply nested. Insert the
// BLOCK just above the LOOP.
- for (int i = 0; i < HeaderLoopDepth - 1 - MBBLoopDepth; ++i)
+ for (unsigned i = 0; i < HeaderLoopDepth - 1 - MBBLoopDepth; ++i)
HeaderLoop = HeaderLoop->getParentLoop();
Header = HeaderLoop->getHeader();
InsertPos = Header->begin();
More information about the llvm-commits
mailing list