[LLVMdev] [PATCH] parallel loop metadata

Hal Finkel hfinkel at anl.gov
Mon Feb 4 09:35:39 PST 2013


----- Original Message -----
> From: "Nadav Rotem" <nrotem at apple.com>
> To: "Pekka Jääskeläinen" <pekka.jaaskelainen at tut.fi>
> Cc: "Tobias Grosser" <tobias at grosser.es>, "CVS Commit Messages for LLVM repository" <llvm-commits at cs.uiuc.edu>,
> "Sebastian Pop" <spop at codeaurora.org>
> Sent: Monday, February 4, 2013 11:09:50 AM
> Subject: Re: [LLVMdev] [PATCH] parallel loop metadata
> 
> Pekka,
> 
> Can you please write llvm-dev and describe your parallel metadata ?
> This is a major change to LLVM and it has the potential to affect
> every single pass in LLVM.  It should be reviewed by the community
> before we discuss the patch.  Similar proposals were repelled in the
> past (remember the OpenMP "propeller" discussion ?).

I agree with Nadav that community input on this proposal would be good. There are a number of passes that may need to be made aware of this metadata, and some consensus and planning is likely necessary for this to be successful. Nevertheless, this seems necessary for enabling generally useful features (like #pragma ivdep/parallel, etc.) and is worth the effort.

To clarify history, the reason that the metadata-based OpenMP schemes died was not due to the "propeller" arguments (which said that parallelization semantics are just not a good fit for LLVM), but rather due to fundamental correctness issues specific to OpenMP. Specifically, there are cases where it would not be legal to drop metadata that produced parallel regions, and a fundamental design principle of metadata is that dropping it must not cause miscompilation. It was decided to move ahead with frontend lowering under the assumption that the backend would either be provided with, or could itself deduce, the information necessary for later optimization where appropriate. This kind of metadata fits into that general plan.

Thanks again,
Hal

> 
> Thanks,
> Nadav
> 
> On Feb 4, 2013, at 5:23 AM, Pekka Jääskeläinen
> <pekka.jaaskelainen at tut.fi> wrote:
> 
> > Hi,
> > 
> > Here's an updated patch with the remarks from Tobias and Sebastian
> > addressed.
> > 
> > On 02/04/2013 11:30 AM, Pekka Jääskeläinen wrote:
> >> branch itself). That should do (if it works), unless you have a
> >> better
> >> idea for this.
> > 
> > I ended up using the trick TBAA uses to create metadata that won't
> > get merged (thus remains to be referred to only by one loop's
> > metadata)
> > by using a metadata that refers to itself.
> > 
> > It also now supports nested parallel loops via referring to a
> > metadata that
> > points to all the loop identifier metadatas the memory accessing
> > instruction is inside of.
> > 
> > Thanks,
> > --
> > Pekka
> > <parallel-loop-metadata.patch>_______________________________________________
> > llvm-commits mailing list
> > llvm-commits at cs.uiuc.edu
> > http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
> 
> 
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
> 




More information about the llvm-commits mailing list