[llvm-dev] [RFC] Create llvm/lib/Frontend

Chris Lattner via llvm-dev llvm-dev at lists.llvm.org
Mon Nov 18 20:54:14 PST 2019

> On Nov 12, 2019, at 9:19 PM, Doerfert, Johannes via llvm-dev <llvm-dev at lists.llvm.org> wrote:
> I was hoping to introduce a new top level library in llvm/lib/Frontend
> for code that is (mainly) used by LLVM frontends but not by one
> exclusively. At first, I would place the OpenMP-IR-Builder [1] (and related
> code [0]) there. This Builder translates "OpenMP directives" to LLVM-IR
> and is supposed to be reused in Flang.
> First, I tried to place the OpenMP-IR-Builder into llvm/IR, right next
> to the llvm::IRBuilder, but it would soon introduce a dependence on
> other libraries (first TransformUtils) [2].

Hi Johannes,

I think it is a great idea to share the OpenMP lowering code, but I’m concerned about the name 'lib/Frontend’.  This is a very broad name and there are lots of things that “could be useful for frontends” - and a lot of definitions of what a “frontend" is.

WDYT about naming it something like "lib/OpenMPGen” and generalizing/renaming it later when the scope is more clear?


> There are more things (especially parts of Clang) that could arguably be
> shared across frontends and therefore be moved into a such a dedicated
> location. If it turns out this is a controversial RFC, we will provide
> examples and reasons.
> I hope this is fairly straightforward as this does not introduce any
> drawbacks (I know of).
> Please let me know if you have an opinion on this.
> Thanks,
>  Johannes
> [0] https://reviews.llvm.org/D69853
> [1] https://reviews.llvm.org/D69785
> [2] https://reviews.llvm.org/D70109
> _______________________________________________
> LLVM Developers mailing list
> llvm-dev at lists.llvm.org
> https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev

More information about the llvm-dev mailing list