Scott Michel
2010-Feb-26 06:23 UTC
[LLVMdev] RegisterScavenging on targets without subregisters
No, I wasn't having a management lobotomy moment. If the target's registers have no subregisters, SubUsed is false and the assert gets tripped. Ok, back to the original question: What was the original intent in this code (lines 186-193 in lib/CodeGen/RegisterScavenging.cpp)? -scooter On Thu, Feb 25, 2010 at 7:00 PM, Scott Michel <scooter.phd at gmail.com> wrote:> Ugh. Management lobotomy kicked in. Need to RTFC better. > > > On Thu, Feb 25, 2010 at 6:18 PM, Scott Michel <scooter.phd at gmail.com>wrote: > >> There's an assert at line 192, lib/CodeGen/RegisterScavenging.cpp that >> appears to get tripped on targets that don't have subregisters defined: >> >> bool SubUsed = false; >> for (const unsigned *SubRegs = TRI->getSubRegisters(Reg); >> unsigned SubReg = *SubRegs; ++SubRegs) >> if (isUsed(SubReg)) { >> SubUsed = true; >> break; >> } >> assert(SubUsed && "Using an undefined register!"); >> >> CellSPU does not define any subregisters; consequently, SubUsed will >> always be false and trip the assert. What's the intended behavior (before I >> submit a bug report)? >> >> >> -scooter >> > >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20100225/3ffc020c/attachment.html>
Kalle.Raiskila at nokia.com
2010-Feb-26 07:25 UTC
[LLVMdev] RegisterScavenging on targets without subregisters
Scott Michel skrev:> No, I wasn't having a management lobotomy moment. If the target's registers have > no subregisters, SubUsed is false and the assert gets tripped. > > Ok, back to the original question: What was the original intent in this code > (lines 186-193 in lib/CodeGen/RegisterScavenging.cpp)?You beat me to it :). A simple bypass (patch attached) does at least not break 'make check' with x86 and SPU backends. (And fixes the problem with call.ll-test breaking when the SPU bigframes patch is applied) kalle -------------- next part -------------- A non-text attachment was scrubbed... Name: regscavenge_subreg.patch Type: text/x-patch Size: 853 bytes Desc: regscavenge_subreg.patch URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20100226/b3f7f35d/attachment.bin>
Scott Michel
2010-Feb-26 18:09 UTC
[LLVMdev] RegisterScavenging on targets without subregisters
Kalle: Your patch is similar to what I'd coded (and am testing, which means a couple of hours before I consider committing). Other than cosmetic changes and changing 'NULL' to '0' (it's an integer list, after all). This patch now causes new problems in the CellSPU backend (more stqd's and lqd's), so I have to investigate those before committing the patch. 'make test' is our friend. 'make test' is our friend. 'make test' is our friend. :-) -scooter On Thu, Feb 25, 2010 at 11:25 PM, <Kalle.Raiskila at nokia.com> wrote:> > Scott Michel skrev: > > No, I wasn't having a management lobotomy moment. If the target's > registers have > > no subregisters, SubUsed is false and the assert gets tripped. > > > > Ok, back to the original question: What was the original intent in this > code > > (lines 186-193 in lib/CodeGen/RegisterScavenging.cpp)? > > You beat me to it :). A simple bypass (patch attached) does at least not > break 'make check' with x86 and SPU backends. (And fixes the problem > with call.ll-test breaking when the SPU bigframes patch is applied) > > kalle >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20100226/f9dee0a0/attachment.html>
Possibly Parallel Threads
- [LLVMdev] RegisterScavenging on targets without subregisters
- [LLVMdev] RegisterScavenging on targets without subregisters
- [LLVMdev] RegisterScavenging on targets without subregisters
- [LLVMdev] RegisterScavenging on targets without subregisters
- [LLVMdev] Patch - big stackframes on SPU