[llvm-dev] TableGen 'code' type to be eliminated
Madhur Amilkanthwar via llvm-dev
llvm-dev at lists.llvm.org
Fri Nov 20 09:33:23 PST 2020
Well, it is not semantically different but having "code" in .td files does
make the files readble to me, at least. It distinctly tells me that the
value of the field is a C++ code which needs to be grammatically correct.
This extra semantics associated with "code" is appealing for readibility.
On Fri, Nov 20, 2020, 10:22 PM Paul C. Anagnostopoulos via llvm-dev <
llvm-dev at lists.llvm.org> wrote:
> We are seriously considering eliminating the 'code' type from TableGen.
> The 'code' type is used to represent code sequences, which are specified
> with the [{ ... }] brackets. The bracket syntax will be retained, but the
> type distinction will be eliminated.
>
> A code sequence is stored as a string, but with the type of 'code'. Some
> string operations, such as the paste operator (#), work on code, too. But
> other operations, such as !strconcat and !eq, do not. There does not appear
> to be any reason to maintain the distinction between string and code,
> except when formatting the value of a field. We will retain the two formats
> "..." and [{...}] when printing a field value.
>
> I have checked all the TableGen backends and none appear to make any
> semantic distinction between strings and code.
>
> _______________________________________________
> 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/1d79d42e/attachment-0001.html>
More information about the llvm-dev
mailing list