diff options
author | Jakob Stoklund Olesen <stoklund@2pi.dk> | 2010-05-17 17:18:59 +0000 |
---|---|---|
committer | Jakob Stoklund Olesen <stoklund@2pi.dk> | 2010-05-17 17:18:59 +0000 |
commit | 176a9c4272ea29598cb96622f19fb3f38b895031 (patch) | |
tree | f879827ca529ba47a5c9ad3ccb4c800a0a79775a /llvm/lib/CodeGen/RegAllocFast.cpp | |
parent | f7a88254847f7424995c9a33975289f82a5d4a63 (diff) | |
download | bcm5719-llvm-176a9c4272ea29598cb96622f19fb3f38b895031.tar.gz bcm5719-llvm-176a9c4272ea29598cb96622f19fb3f38b895031.zip |
Avoid allocating the same physreg to multiple virtregs in one instruction.
While that approach works wonders for register pressure, it tends to break
everything.
This should unbreak the arm-linux builder and fix a number of miscompilations.
llvm-svn: 103946
Diffstat (limited to 'llvm/lib/CodeGen/RegAllocFast.cpp')
-rw-r--r-- | llvm/lib/CodeGen/RegAllocFast.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/RegAllocFast.cpp b/llvm/lib/CodeGen/RegAllocFast.cpp index ea3fa61c890..a8d1e0d1f08 100644 --- a/llvm/lib/CodeGen/RegAllocFast.cpp +++ b/llvm/lib/CodeGen/RegAllocFast.cpp @@ -471,6 +471,7 @@ void RAFast::allocVirtReg(MachineInstr *MI, LiveRegEntry &LRE, unsigned Hint) { unsigned BestReg = 0, BestCost = spillImpossible; for (TargetRegisterClass::iterator I = AOB; I != AOE; ++I) { + if (UsedInInstr.test(*I)) continue; unsigned Cost = calcSpillCost(*I); // Cost is 0 when all aliases are already disabled. if (Cost == 0) |