<div dir="ltr">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.</div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Nov 20, 2020 at 11:08 AM Paul C. Anagnostopoulos via llvm-dev <<a href="mailto:llvm-dev@lists.llvm.org">llvm-dev@lists.llvm.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">At 11/20/2020 01:47 PM, Madhur Amilkanthwar wrote:<br>
>What is the motivation to deprecate the type though? <br>
<br>
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.<br>
<br>
Then I searched all the .td files for !cast<code>. There are no occurrences. <br>
<br>
So it appears to be a nice simplification for TableGen, additional flexibility for .td files, and a positive change for backends.<br>
<br>
_______________________________________________<br>
LLVM Developers mailing list<br>
<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a><br>
<a href="https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev" rel="noreferrer" target="_blank">https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev</a><br>
</blockquote></div>