[PATCH] fix PR17906, a bug in ArgumentPromotion

Bill Wendling isanbard at gmail.com
Fri Nov 15 00:03:03 PST 2013


LGTM. Thanks!

-bw

On Nov 14, 2013, at 4:32 PM, Manman Ren <manman.ren at gmail.com> wrote:

> 
> 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
> 
> 
> 
> <0001-ArgumentPromotion-correctly-transfer-TBAA-tags-and-a.patch>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20131115/d09a239a/attachment.html>


More information about the llvm-commits mailing list