[llvm-commits] [PATCH] Fix LLVM error after lowering thumb tMOVCCr_pseudo

Logan Chien tzuhsiang.chien at gmail.com
Wed Jan 9 08:42:32 PST 2013


Hi,

  I have refined the patch. This bug is not caused by the live-in
registers.  The root cause is that we are splitting machine basic block,
and using physical registers across two machine basic blocks.  According to
the document for register allocation, this will definitely result in errors
in some cases.

  The revised patch includes a simple live variable analysis to compute the
usage of physical registers that will be split to the new machine basic
blocks, and then replace them with the virtual registers created at the end
of original machine basic block.  Please have a look.  Thanks.

  BTW, maybe we should generalize this patch into something like
MachineBasicBlock::SplitAt(...).  There are many code using similar
patterns in ARMISelLowering.cpp (and so do other architectures).  Any ideas
or comments from MachineBasicBlock experts?  Thanks.

Sincerely,
Logan


On Fri, Dec 21, 2012 at 2:04 AM, Logan Chien <tzuhsiang.chien at gmail.com>wrote:

> Hi,
>
>   After specifying the -verify-machineinstrs, I found my solution is not
> correct (live-ins should only specified for function entry or landing
> pads.)  I will try to come up with a correct patch ASAP.  Thanks.
>
> Logan
>
>
>
> You may want to specify the CPU name in the test run line. It might be a
>> good idea to specify -verify-machineinstrs as well. Otherwise the patch
>> seems obvious to me.
>>
>> Evan
>>
>> Sent from my iPad
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20130110/7126d567/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Fix-LLVM-error-after-lowering-thumb-tMOVCCr_pseudo.patch
Type: application/octet-stream
Size: 9115 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20130110/7126d567/attachment.obj>


More information about the llvm-commits mailing list