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

Simon Tatham via llvm-dev llvm-dev at lists.llvm.org
Fri Jul 5 03:43:12 PDT 2019


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


More information about the llvm-dev mailing list