diff options
author | Chris Lattner <sabre@nondot.org> | 2006-09-19 18:02:01 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2006-09-19 18:02:01 +0000 |
commit | 2b41b8e8701cc9188c12ead84f87e614c86be8c0 (patch) | |
tree | 993c098f1ce7633ab4ef85aafba65eb88816eea5 /lib/CodeGen/RegAllocLocal.cpp | |
parent | 4d4c0217587d6cd76da9690aca0be49f5508db7a (diff) |
Fix UnitTests/2005-05-12-Int64ToFP.c with llc-beta. In particular, do not
allow it to go into an infinite loop, filling up the disk!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30494 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/RegAllocLocal.cpp')
-rw-r--r-- | lib/CodeGen/RegAllocLocal.cpp | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/lib/CodeGen/RegAllocLocal.cpp b/lib/CodeGen/RegAllocLocal.cpp index 5b9186dbe3..e42603e629 100644 --- a/lib/CodeGen/RegAllocLocal.cpp +++ b/lib/CodeGen/RegAllocLocal.cpp @@ -621,18 +621,21 @@ void RA::AllocateBasicBlock(MachineBasicBlock &MBB) { for (const unsigned *ImplicitDefs = TID.ImplicitDefs; *ImplicitDefs; ++ImplicitDefs) { unsigned Reg = *ImplicitDefs; - if (PhysRegsUsed[Reg] == -2) continue; - - spillPhysReg(MBB, MI, Reg, true); - PhysRegsUseOrder.push_back(Reg); - PhysRegsUsed[Reg] = 0; // It is free and reserved now + bool IsNonAllocatable = PhysRegsUsed[Reg] == -2; + if (!IsNonAllocatable) { + spillPhysReg(MBB, MI, Reg, true); + PhysRegsUseOrder.push_back(Reg); + PhysRegsUsed[Reg] = 0; // It is free and reserved now + } PhysRegsEverUsed[Reg] = true; for (const unsigned *AliasSet = RegInfo->getAliasSet(Reg); *AliasSet; ++AliasSet) { if (PhysRegsUsed[*AliasSet] != -2) { - PhysRegsUseOrder.push_back(*AliasSet); - PhysRegsUsed[*AliasSet] = 0; // It is free and reserved now + if (!IsNonAllocatable) { + PhysRegsUseOrder.push_back(*AliasSet); + PhysRegsUsed[*AliasSet] = 0; // It is free and reserved now + } PhysRegsEverUsed[*AliasSet] = true; } } |