Are there some strong naming conventions in TableGen?


For the development of a new micro-controller backend, I try to lowering the following store SDNode: t5: ch = store<ST2%ptr2> t0, Constant:i16<3>, FrameIndex:i16<1>, undef:i16

I have defined the following instruction and associated DAG pattern.

def MOVSUTO_A_i32o : CLPFPU_A_i32o_Inst<0b1000001101,

(ins IMM16Operand:$ImmA,FPUaOffsetOperand:$OffsetB),

(outs ),



[(store (i16 IMM16Operand:$ImmA), FPUaOffsetOperand:$OffsetB)],NoItinerary>;

While building, I got the following error:

There are some names that TableGen has some internal knowledge of, and "imm" is one of them. At the same time there are no conventions regarding other, non-reserved names. Whether you call something IMM1 or imm1 makes no difference as long as you don't use the exact reserved name.


Krzysztof is correct - there is no particular naming scheme involved
besides some reserved stuff. Basically here tablgen is complaining
that the node type "IMM16Operand" is unknown - you'd need to define