[llvm-dev] Python build dependency in LLVM and/or clang?

David Zarzycki via llvm-dev
Mon, 15 Jul 2019 09:03:11 -0000

Hi Simon,

Just a reminder: TableGen is a huge build bottleneck on some machines. I worry
that dumping JSON and then pushing that through Python would make this
bottleneck much worse. Consider this: TableGen performance is so critical that
there is an entire build option just to force it to be built with optimizations
when creating debug builds: LLVM_OPTIMIZED_TABLEGEN

Dave

> On Jul 5, 2019, at 12:43 PM, Simon Tatham via llvm-dev <llvm-dev at
lists.llvm.org> wrote:
>
> Hello llvm-devs,
>
> I'm currently starting to look at implementing compiler intrinsics for
the Arm MVE vector instruction set.
>
> In a similar sort of style to the existing NEON intrinsics, this is going
to involve describing the set of functions needed in Tablegen, and then
processing that data into a header file and some bits and pieces to compile into
clang (the list of builtins, data tables needed by Sema or CodeGen, etc). But
the differences between MVE and NEON are large enough - particularly the
predication system - that I'm going to need new Tablegen backends, rather
than reusing the NEON ones.
>
> I would like, if possible, to write these Tablegen backends in Python, by
consuming the output of the 'llvm-tblgen -dump-json' feature I added to
Tablegen last year. I think they'll be simpler and more concise that way
than in C++, not to mention quicker to develop.
>
> But before I do that, I wanted to check whether there would be any
objection on grounds of build dependencies. Is it acceptable to require Python
as part of the normal build process for LLVM? Or is Python something that can be
used in places like the test suite and developer utilities, but has to be kept
out of the main build to make bootstrapping as easy as possible? I looked for a
written policy on this, but didn't find one.
>
> Cheers,
> Simon
> _______________________________________________
> LLVM Developers mailing list
> llvm-dev at lists.llvm.org
> https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev