[PATCH] fix PR17906, a bug in ArgumentPromotion

Bill Wendling isanbard at gmail.com
Thu Nov 14 14:22:43 PST 2013


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/a2db78ae/attachment.html>


More information about the llvm-commits mailing list