[PATCH] D23549: [SROA] Preserve llvm.mem.parallel_loop_access metadata

Chandler Carruth via llvm-commits llvm-commits at lists.llvm.org
Sat Aug 27 16:09:59 PDT 2016


chandlerc added a comment.

In https://reviews.llvm.org/D23549#527261, @hfinkel wrote:

> > SROA doesn't preserve the llvm.mem.parallel_loop_access metadata when it transforms loads/stores.
>
> >  (This patch is not a systematic effort to catch all the cases missed by SROA, but it at least covers those exposed by this testcase / by PR28981).
>
>
> The higher-level questions here clearly seem to be:
>
> 1. Does SROA every do anything that will add loop-carried dependencies? If not, we could do this everywhere.


Off the top of my head I can't figure out how it could do this anywhere other than the PHI speculation parts.

> 

> 

> 2. Does SROA also drop AA metadata we should be preserving in the same circumstances? I only see metadata handling in speculatePHINodeLoads and speculateSelectInstLoads, but nowhere else.


I can absolutely believe we're dropping metadata when we rewrite stuff but fail to promote it to registers. I think the rewriting logic here never got the most careful of analysis because we "usually" think of it as rewriting in preparation for promotion, but we definitely have lots of rewrites at this point that don't involve in promotion so we should probably systematically go through this.


https://reviews.llvm.org/D23549





More information about the llvm-commits mailing list