diff options
Diffstat (limited to 'llvm/lib/Target/WebAssembly/WebAssemblyCFGStackify.cpp')
-rw-r--r-- | llvm/lib/Target/WebAssembly/WebAssemblyCFGStackify.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/llvm/lib/Target/WebAssembly/WebAssemblyCFGStackify.cpp b/llvm/lib/Target/WebAssembly/WebAssemblyCFGStackify.cpp index 7289104..dbd00bc 100644 --- a/llvm/lib/Target/WebAssembly/WebAssemblyCFGStackify.cpp +++ b/llvm/lib/Target/WebAssembly/WebAssemblyCFGStackify.cpp @@ -162,9 +162,9 @@ static void SortBlocks(MachineFunction &MF, const MachineLoopInfo &MLI) { 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 &MF, const MachineLoopInfo &MLI) { #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(MachineBasicBlock &MBB, 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(); |