[PATCH] Improve machine code correctness in codegen

Matthias Braun mbraun at apple.com
Thu Oct 3 16:53:10 PDT 2013


Attach is a revised version of the if conversion patch with a test case included.

Description: remove kill flags after if conversion if necessary
When if converting something like:
true:
   ... = R0<kill>

false:
   ... = R0<kill>

then the instructions of the true block must not have a <kill> flag
anymore, as the instruction of the false block follow and do still read
the R0 value.
Specifically this patch determines the set of register live-in in the
false block (possibly after simulating the liveness changes of the
duplicated instructions). Each of these live-in registers mustn't be
killed.

Greetings	
	Matthias


On Oct 3, 2013, at 11:02 AM, Matthias Braun <mbraun at apple.com> wrote:

> 
> On Oct 3, 2013, at 10:52 AM, Eric Christopher <echristo at gmail.com> wrote:
> 
>> The standard mechanism is one patch per email. Also, usually more
>> description as well.
> I hope the descriptions in the commit-messages are enough. Here they are again:
> 
> * fix bad kill flags after if conversion:
> If the true block had kill flags on registers being used in the false
> block, then these kill flags must be removed after if conversion.
> 
> * fix post ra scheduler setting wrong kill flags in bundles
> The PostRA scheduler only looked at the BUNDLE marker instruction, which
> resulted in invalid kill flags inside the bundle. This version changes
> it so the kill flags are set inside the bundle at the latest bundle
> instruction possible.
> 
> * MachineVerifier: allow physreg use if just a subreg is defined
> We can't mark partially undefined registers, so we have to allow reading
> a register in the machine verifier if just parts of a register are
> defined.
> 
> Thanks
> 	Matthias
> 
>> 
>> -eric
>> 
>> On Thu, Oct 3, 2013 at 10:44 AM, Matthias Braun <mbraun at apple.com> wrote:
>>> The attached patches improve code correctness (in the sense of -verify-machineinstrs) in codegen. This mainly improves the situation for the arm backend. Please review, thanks.
>>> 
>>> Greetings
>>>       Matthias
>>> 
>>> 
>>> _______________________________________________
>>> llvm-commits mailing list
>>> llvm-commits at cs.uiuc.edu
>>> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
>>> 
> 
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20131003/4653ca65/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: remove-kill-flags-after-if-conversion-if-necessary.patch
Type: application/octet-stream
Size: 9766 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20131003/4653ca65/attachment.obj>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20131003/4653ca65/attachment-0001.html>


More information about the llvm-commits mailing list