[llvm-dev] Question about register allocation

Josh Sharp via llvm-dev llvm-dev at lists.llvm.org
Tue Feb 12 20:45:07 PST 2019


Hi,
I'd like to understand how register allocation works in the case where an instruction is folded into another one. Where in the code would be a good place to start looking at?


After ISEL, one of the instructions has another instruction folded into it, which looks like this

t1: i32,i1,i1,i1,i1 = ADDRR TargetFrameIndex:i32<0>, MOVRI:i32,i1,i1

But during the 'Assembly Printer' pass, when emitting the assembly for ADDRR, the assertion at the beginning of getRegisterName() in XXXGenAsmWriter.inc fails because RegNo is 0.
I'd like to know how that happened.

Thanks.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20190213/9beb0835/attachment.html>


More information about the llvm-dev mailing list