[PATCH] GSoC project: "Add support for directive to uniquely identify the loops in high-level languages"

Dmitry N. Mikushin maemarcus at gmail.com
Sun Apr 14 05:18:36 PDT 2013


Hi Anton,

I'd split your point into "preserve" and "handle" parts. For "preserve" I
fully agree:

Adding directive support would mostly be the work on Clang frontend side:
= Choose directive representation for LLVM IR: metadata, intrinsic, etc.
= Add parsing of directive into parser and codegen it into selected
representation
= Ensure standard chains of LLVM optimization passes preserve the directive
information
= Write a dummy LLVM pass showing how the loop naming directive could be
used for diagnostics

- Good?

For handling - it depends. At this moment I'm not sure if we should
directly "enforce" optimizations developers to use this diagnostics or
break into their code introducing necessary changes ourselves. However, in
our group we will definitely use this extension to ensure particular loops
are taken onto GPU. I think we could start broader discussion after
committing initial proposal.

Thanks,
- D.

2013/4/13 Anton Korobeynikov <anton at korobeynikov.info>

> > Adding directive support would mostly be the work on Clang frontend side:
> > = Choose directive representation for LLVM IR: metadata, intrinsic, etc.
> > = Add parsing of directive into parser and codegen it into selected
> > representation
> > = Write a dummy LLVM pass showing how the loop naming directive could be
> > used for diagnostics
> The main part is missing though:
> = Make sure all LLVM optimization passes handle / preserve this
> directive somehow. I'm not sure it's possible in even half of all the
> cases.
>
> --
> With best regards, Anton Korobeynikov
> Faculty of Mathematics and Mechanics, Saint Petersburg State University
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20130414/92aaa1b5/attachment.html>


More information about the llvm-commits mailing list