[PATCH] Fix aliasing issue caused by MemCpyOptimizer (PR18304)
Philip Reames
listmail at philipreames.com
Fri Jun 20 16:29:18 PDT 2014
Your change does address a correctness issue and does so in a reasonable
way. I wouldn't worry too much about the possible performance regression.
One mandatory change:
- Add a test case which checks the optimization does not apply when
accessed via capturing parameter.
I'd also prefer that you:
- either use std::distance (rather than iterator subtraction) or
(preferred) use a argument number indexed loop.
- If you keep the iterator loop, consider a range loop. Or at least
move the declaration of B, E into the initializer of the loop to
restrict their scope.
Philip
On 06/20/2014 06:13 AM, David Wiberg wrote:
> Hello,
>
> The attached patch fixes an aliasing issue caused by MemCpyOptimizer
> by performing the following changes:
> - Added requirement that the callee does not capture the src pointer for
> the transformation to apply.
> - Updated test cases by adding nocapture attributes where applicable
>
> See http://lists.cs.uiuc.edu/pipermail/llvmdev/2014-June/073819.html
> for some more information. My main concern is performance regressions
> but I haven't been able to get any benchmark results.
>
> Best regards
> David
>
>
> _______________________________________________
> 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/20140620/37784349/attachment.html>
More information about the llvm-commits
mailing list