diff --git a/llvm/lib/CodeGen/RegAllocFast.cpp b/llvm/lib/CodeGen/RegAllocFast.cpp index ae0114f326f0..ef3cc16cd053 100644 --- a/llvm/lib/CodeGen/RegAllocFast.cpp +++ b/llvm/lib/CodeGen/RegAllocFast.cpp @@ -112,6 +112,9 @@ namespace { // PhysRegState - One of the RegState enums, or a virtreg. std::vector PhysRegState; + SmallVector VirtDead; + SmallVector Coalesced; + // Set of register units. typedef SparseSet UsedInInstrSet; @@ -810,8 +813,8 @@ void RAFast::AllocateBasicBlock() { if (MRI->isAllocatable(LI.PhysReg)) definePhysReg(*MII, LI.PhysReg, regReserved); - SmallVector VirtDead; - SmallVector Coalesced; + VirtDead.clear(); + Coalesced.clear(); // Otherwise, sequentially allocate each instruction in the MBB. while (MII != MBB->end()) {