[PATCH] D93969: [TableGen] Add field kind to the RecordVal class.

Francois Pichet via llvm-commits llvm-commits at lists.llvm.org
Mon Jan 11 16:05:45 PST 2021


The identifier come from tablegen class parameter:

class InstD_LD<bits<8> opVal, string DataSize, string PtrMode, string
OffsetMode,
                   bit isSExt, bit isSub, string SubOrAdd, bit isDS, bit
isTemp,
                   dag outs, dag ins, string asmstr, list<dag> pattern>

  let BaseOpcodeLDST = asmstr # DataSize # isSExt # isDS # isTemp;

So this will concat string and bit together.
error: Initializer of 'BaseOpcodeLDST' in 'LD_byte_ptr8_ds_add_sext_ri7'
could not be fully resolved: !strconcat("ldl $rsd2, $addr",
!strconcat("byte", !strconcat("1", !strconcat("1", !cast<string>(0)))))

it seems like isTemp cannot be converted to string.

Sorry I can't reduce this more.. its very difficult to extract the problem
in a self contained test case.



On Mon, Jan 11, 2021 at 6:05 PM Paul C. Anagnostopoulos via Phabricator <
reviews at reviews.llvm.org> wrote:

> Paul-C-Anagnostopoulos added a comment.
>
> Could you post a simple file that reproduces the problem? Without the
> context of BaseOpcodeSTSrcKind and all the identifiers being pasted, I
> cannot tell what's going on. It certainly isn't necessary to declare a
> field 'field' just to set it to a concatenated value.
>
>
> Repository:
>   rG LLVM Github Monorepo
>
> CHANGES SINCE LAST ACTION
>   https://reviews.llvm.org/D93969/new/
>
> https://reviews.llvm.org/D93969
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210111/7207cad5/attachment.html>


More information about the llvm-commits mailing list