[PATCH] fix PR17906, a bug in ArgumentPromotion

Manman Ren manman.ren at gmail.com
Thu Nov 14 16:32:16 PST 2013


How is it now?

Thanks,
Manman


On Thu, Nov 14, 2013 at 2:22 PM, Bill Wendling <isanbard at gmail.com> wrote:

> Hi Manman,
>
> Please add some comments to the 'OriginalLoads' variable saying why the
> key value is a std::pair. Also, you can probably remove the 'attributes'
> stuff from the testcase.
>
> -bw
>
>
> On Thu, Nov 14, 2013 at 1:59 PM, Manman Ren <manman.ren at gmail.com> wrote:
>
>>
>> We used to use std::map<IndicesVector, LoadInst*> for OriginalLoads, and
>> when we try to promote two arguments, they will both write to OriginalLoads
>> causing created loads for the two arguments to have the same original load.
>> And the same tbaa tag and alignment will be put to the created loads for
>> the two arguments.
>>
>>
>> The fix is to use std::map<std::pair<Argument*, IndicesVector>,
>> LoadInst*> for OriginalLoads, so each Argument will write to different
>> parts of the map.
>>
>>
>> Please review,
>>
>>
>> Thanks,
>>
>> Manman
>>
>>
>>
>> _______________________________________________
>> 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/20131114/5b7cfdbc/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-ArgumentPromotion-correctly-transfer-TBAA-tags-and-a.patch
Type: application/octet-stream
Size: 5156 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20131114/5b7cfdbc/attachment.obj>


More information about the llvm-commits mailing list