[Openmp-dev] [RFC] Proposed interplay of Clang & Flang & LLVM wrt. OpenMP [@Flang-dev]
Doerfert, Johannes via Openmp-dev
openmp-dev at lists.llvm.org
Fri May 3 08:37:30 PDT 2019
The intersection is OpenMP. The directives are almost identical. Trying to create the same IR in two places, as it has to work with a single runtime, will be a hustle.
I guess this email was sent before I added implementation possibilities. I can add more details if you let me know on what.
Get Outlook for Android<https://aka.ms/ghei36>
From: Guray Ozen <gozen at nvidia.com>
Sent: Friday, May 3, 2019 11:27:28 AM
To: flang-dev at lists.flang-compiler.org; openmp-dev at lists.llvm.org; Alexey Bataev
Cc: Xinmin; Ravi; Doerfert, Johannes
Subject: RE: [RFC] Proposed interplay of Clang & Flang & LLVM wrt. OpenMP [@Flang-dev]
We are in the beginning in F18/flang as you mentioned. I agree that it would be great if we have a common code generator for the frontends. However, I am not seeing any intersecting between the internals of clang and flang that we can rely on to implement "OpenMP-IRBuilder".
This would be great if the RFC is elaborated.
From: Alexey Bataev <a.bataev at outlook.com>
Sent: Friday, May 3, 2019 5:13 PM
To: Guray Ozen <gozen at nvidia.com>; Doerfert, Johannes <jdoerfert at anl.gov>
Cc: Xinmin <xinmin.tian at intel.com>; Ravi <ravi.narayanaswamy at intel.com>
Subject: Re: [RFC] Proposed interplay of Clang & Flang & LLVM wrt. OpenMP [@Flang-dev]
1. That's why it was recommended to implement it as a kind of plugin for Clang. It is a bad idea to expose clang/fortran internals to LLVM and it won't be accepted.
2. In priniciple, the idea can be implemented. But instead of the classes, you may pass functions to the codegen plugin, which know how to work with the classes in Clang/Flang.
03.05.2019 11:04, Guray Ozen пишет:
That sounds interesting. However, I have a few questions about your RFC.
>From what I understand, you are suggesting a general "OpenMP-IRBuilder" where different frontends will benefit, and it will be in core-LLVM. However, the front ends may have very different AST. How do you plan to provide a common interface for different ASTs? If it will be aware of front-end ASTs, how would be a general IR builder? Also, if it is specific to AST, do you think it should be somewhere other than the core LLVM?
You also outlining in the end, so will clang still do the early outlining?
From: flang-dev <flang-dev-bounces at lists.flang-compiler.org><mailto:flang-dev-bounces at lists.flang-compiler.org> On Behalf Of Doerfert, Johannes via flang-dev
Sent: Friday, May 3, 2019 4:35 PM
To: Alexey Bataev <a.bataev at outlook.com><mailto:a.bataev at outlook.com>
Cc: flang-dev at lists.flang-compiler.org<mailto:flang-dev at lists.flang-compiler.org>; Xinmin <xinmin.tian at intel.com><mailto:xinmin.tian at intel.com>; Ravi <ravi.narayanaswamy at intel.com><mailto:ravi.narayanaswamy at intel.com>
Subject: Re: [Flang-dev] [RFC] Proposed interplay of Clang & Flang & LLVM wrt. OpenMP [@Flang-dev]
[Respond on the flang-list to a comment on the others.]
From: Alexey Bataev <a.bataev at outlook.com><mailto:a.bataev at outlook.com>
Sent: Thursday, May 2, 2019 11:54:14 AM
To: Doerfert, Johannes; LLVM-Dev
Cc: cfe-dev at lists.llvm.org<mailto:cfe-dev at lists.llvm.org>; Openmp-dev
Subject: Re: [Openmp-dev] [RFC] Proposed interplay of Clang & Flang &
LLVM wrt. OpenMP [@Flang-dev]
What you're talking about is the late outlining, which should be the
part of the LLVM. As I understand, Intel already has preliminary
implementation of this and they promised to publish it in May.
This is completely unrelated to late outlining, which may or may not become part of LLVM:
- Late outlining is about _how_ parallelism/OpenMP is lowered in the
front-end and potentially again later on.
- This proposal is about _where_ the encoding happens and how we keep
Clang & Flang in-sync.
If we decide to adopt a late outlining scheme, there would be a single location where we implement it in the "front-end", the OpenMP-IRBuilder.
Also, this was discussed some time ago, if I remember it correctly,
and it was recommended to implement this common codegen as a kind of
plugin. I don't remember the final result of this discussion, though.
I don't understand this comment. What do you mean by "kind of plugin"?
Is there a record of the discussion so we could look up the final result?
This email message is for the sole use of the intended recipient(s) and may contain confidential information. Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please contact the sender by reply email and destroy all copies of the original message.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Openmp-dev