[LLVMdev] [RFC] Parallelization metadata and intrinsics in LLVM (for OpenMP, etc.)
Hal Finkel
hfinkel at anl.gov
Tue Oct 2 11:53:05 PDT 2012
On Tue, 2 Oct 2012 20:54:03 +0530
Sanjoy Das <sanjoy at playingwithpointers.com> wrote:
> Hi,
>
> > constructs (e.g., parallel regions) and semantics. LLVM is a
> > language- neutral IR and infrastructure and OpenMP-specific
> > concepts should not
>
> This is exactly the reason I proposed [1] -- mirroring the openmp
> directives in LLVM IR doesn't seem very elegant. The parallelization
> information in the IR should be general and orthogonal.
>
> I do realize that boxing the loops into procedures in the frontend
> will initially inhibit loop optimizations, but that can be resolved
> with some work.
It is hard to evaluate this without more details. Would you convert
LoopInfo, SE, etc. into module-level passes? Would you inline these
functions early with some special attached semantics? If the second,
how is this different from attaching the special semantics using
intrinsics or metadata?
> Ideally, I'd like to have a different class
> (ParallelLoop, maybe) altogether representing parallel loops and make
> the relevant passes aware of it. More work, yes, but I think such an
> approach will pay off eventually.
Can you be more specific? Pay off how?
Thanks again,
Hal
>
> [1]
> http://lists.cs.uiuc.edu/pipermail/llvmdev/2012-September/053798.html
--
Hal Finkel
Postdoctoral Appointee
Leadership Computing Facility
Argonne National Laboratory
More information about the llvm-dev
mailing list