[llvm-dev] TableGen 'code' type to be eliminated
Thomas Lively via llvm-dev
llvm-dev at lists.llvm.org
Fri Nov 20 16:19:00 PST 2020
Would it be possible to keep "code" in the TableGen syntax as an alias for
"string" while removing the distinction in TableGen backends? That would
retain the documentation benefits of "code" in .td files. TBH, this is how
I thought "code" and "string" already worked; I wasn't aware of the
distinction.
On Fri, Nov 20, 2020 at 11:08 AM Paul C. Anagnostopoulos via llvm-dev <
llvm-dev at lists.llvm.org> wrote:
> At 11/20/2020 01:47 PM, Madhur Amilkanthwar wrote:
> >What is the motivation to deprecate the type though?Â
>
> The initial motivation was to make it easier for the all the string bang
> operators (e.g., !strconcat, !eq, !interleave) to support code. But then I
> started looking around and noticed that very few backends care about the
> distinction. In fact, for at least half the backends, they are checking for
> both StringInit and CodeInit and treating them the same.
>
> Then I searched all the .td files for !cast<code>. There are no
> occurrences.
>
> So it appears to be a nice simplification for TableGen, additional
> flexibility for .td files, and a positive change for backends.
>
> _______________________________________________
> LLVM Developers mailing list
> llvm-dev at lists.llvm.org
> https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20201120/63bd8c7f/attachment.html>
More information about the llvm-dev
mailing list