[llvm-dev] Incompatible type assertion from llvm-tblgen
Krzysztof Parzyszek via llvm-dev
llvm-dev at lists.llvm.org
Mon Sep 26 14:24:39 PDT 2016
On 9/26/2016 3:58 PM, Phil Tomson wrote:
> But don't the defs for ADDR_RR and ADDR_RI also contain dags?
>
> def ADDR_RR : Addr< 2, "SelectAddrRegReg",
> (ops GPRC:$base, GPRC:$offsetreg) >;
> def ADDR_RI : Addr< 2, "SelectAddrRegImm",
> (ops GPRC:$base, i64imm:$offsetimm) >;
>
> Do I need to create some other intermediate node type for a shifted address?
Technically yes, but the list of allowed types is limited.
"RegisterClass" (e.g GPRC) is allowed, as is "Operand" (e.g. i64imm).
You can create a subclass of "Operand" and provide your EncoderMethod
for it.
-Krzysztof
--
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
hosted by The Linux Foundation
More information about the llvm-dev
mailing list