[LLVMdev] LLVM Parallel IR
Herbert Jordan
herbert at dps.uibk.ac.at
Thu Apr 9 06:10:43 PDT 2015
Hi William,
as has been mentioned by Kevin, the idea of building an explicit
parallel IR and associated tools has its merits. With the Insieme
Project (http://insieme-compiler.org) we went along that road and built
an explicit parallel high-level IR for analysing, manipulating and
tuning parallel codes. In particular we managed to design a compact IR
unifying various different parallel language extensions and APIs,
including OpenMP, Cilk, OpenCL and -- to some extend -- MPI.
As part of this work we got to believe that in the general case the
compiler supported coordination and tuning of parallelism in programs is
beyond the scope of conventional low-level IRs. If you are interested in
our experiences, concepts, design and results, an overview can be found
in [1] and a rather extensive description and formalization in the
associated thesis [2].
Maybe those can provide you some insights regarding potential
alternative approaches for your work.
Best,
Herbert
[1] http://dl.acm.org/citation.cfm?id=2523721.2523727
[2] http://www.dps.uibk.ac.at/~csaf7445/pub/phd_thesis_jordan.pdf - in
particular Chapter 3
On 2015-03-17 01:12, Dounia Khaldi wrote:
> Hi William,
>
> Currently, LLVM lowers parallel constructs of OpenMP at the front-end
> level to runtime calls; although simple, this ad-hoc solution prevents
> high-level reasoning about parallel languages while possibly
> introducing semantic inconsistencies in existing sequential program
> analyses. Worse, users implicitly rely upon the lack of
> interprocedural analyses within many compilers to preserve the
> semantics of programs even in the presence of code optimizations.
>
> As part of my PhD work, I worked on introducing a parallel
> intermediate representation extension for parallel compilers which I
> called /SPIRE/. SPIRE was successfully applied to automatically
> parallelize sequential programs within the PIPS source to source
> compiler. (Here is a link to my PhD thesis:
> https://tel.archives-ouvertes.fr/pastel-00935483/document).
>
> As part of my Postdoc work at University of Houston, I am currently
> applying SPIRE to LLVM in order to optimize PGAS languages,
> specifically OpenSHMEM. The idea is to be able to recognize OpenSHMEM
> constructs and represent them explicitly in the LLVM IR using SPIRE to
> take advantage of sequential optimizations offered by LLVM. The
> ultimate goal is to develop new parallel optimizations based on
> SPIRE(LLVM IR). The tricky part here is to prove that the enabled
> optimizations will generate correct codes. I am using SPIRE formal
> operational semantics I developed to prove the correctness of
> optimizations performed on parallel programs.
>
> I can send you a submitted paper regarding this work on LLVM if you
> are interested.
>
> Best,
>
>
> --
> Dounia KHALDI
> Postdoctoral Fellow
> University of Houston
> Department of Computer Science
> 501 Philip G. Hoffman Hall
> Houston, TX 77204-3010
>
> On Mon, Mar 9, 2015 at 10:58 AM, William Moses <wmoses at csail.mit.edu
> <mailto:wmoses at csail.mit.edu>> wrote:
>
> I'm part of a research group at MIT looking to create an extension
> of LLVM that inherently allows one to nicely code a parallel loop.
>
> Most parallel frameworks tend to take the body of a parallel loop
> and stick it inside of a function for the parallel runtime to call
> when appropriate. However, this makes optimizations significantly
> more difficult as most compiler optimizations tend to be
> intraprocedural. The goal of this parallel IR is to allow LLVM to
> more easily optimize parallel code -- which often gets the short
> end of the optimization stick.
>
> Long story short: I was wondering if anyone in the LLVM community
> has already begun a similar project or knows of something that
> begins to accomplish this.
>
> Additionally, does anyone who has worked with parallelism in LLVM
> have any specific comments or suggestions regarding this project.
>
> Sincerely,
> William Moses
> MIT Computer Science and Artificial Intelligence Laboratory
>
>
> _______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu <mailto:LLVMdev at cs.uiuc.edu>
> http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
>
>
>
>
> --
> Dounia KHALDI
> Postdoctoral Fellow
> University of Houston
> Department of Computer Science
> 501 Philip G. Hoffman Hall
> Houston, TX 77204-3010
>
>
> _______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20150409/97f01964/attachment.html>
More information about the llvm-dev
mailing list