[llvm-dev] Extending TableGen's 'foreach' to work with 'multiclass' and 'defm'
Hal Finkel via llvm-dev
llvm-dev at lists.llvm.org
Wed Aug 23 10:21:23 PDT 2017
On 08/23/2017 12:06 PM, Krzysztof Parzyszek via llvm-dev wrote:
> On 8/23/2017 11:58 AM, Hal Finkel via llvm-dev wrote:
>> If we want to go down that route, I can certainly imagine a feasible
>> incremental-transitioning strategy. We could allow TableGen to use an
>> embedded Python interpreter to generate records based on Python data
>> structures, and then, combine records from the existing .td files
>> with those generated by the Python code. We'd use the existing
>> TableGen plugins (which we may need to continue to use regardless,
>> compared to writing Python, for performance reasons), and so we could
>> incrementally transition existing definitions from .td files to
>> Python as appropriate.
>
> Would we then eliminate TableGen completely in the long term?
That could also be two separate questions: Would we replace the .td
input language with Python completely in the long term? Would we rewrite
the the backends (i.e., TableGen plugins) in Python? I don't yet have an
opinion on either. I can see advantages to providing Python as input
language. What do you think?
-Hal
>
> -Krzysztof
>
--
Hal Finkel
Lead, Compiler Technology and Programming Languages
Leadership Computing Facility
Argonne National Laboratory
More information about the llvm-dev
mailing list