I found a code section like that :
class ArighLogicI<bits<8> op, string instrAsmm, SDNode opNode,
Operand od, PatLeaf immType, RegisterClass regClass>
: FL<op, (outs GPROut:$ra), (ins regClass:$rb, od:$imm16),
!strconcat(instrAsm,"\t$ra,$rb,$imm16"),
[(set GPROut:$ra, (opNode regClass:$rb, immType:$imm16))], IIAlu> {
let isReMaterializable = 1; // isReMaterializable - could this instruction be materialized again ?
}
For the [(set GPROut:$ra, (opNode regClass:$rb, immType:$imm16))]
, I know it’s a DAG pattern which indicates this instr should fulfill the pattern like
But I still don’t get where and how should I use the keyword “set” and “add”