[LLVMdev] Tablegen generic class argument that accepts SDNode or Intrinsic

Tom Stellard thomas.stellard at amd.com
Wed Oct 26 15:24:53 CDT 2011


Hi,

I'm trying to define a class in tablegen that can have either an SDNode
or an Intrinsic as an argument.  Basically something like this:

class OP1 <Record NodeOrIntr> : Instruction {
  let pattern = [(set Reg:$dst, (NodeOrIntr Reg:$src))];
}

I haven't been able to come with a way to do this yet.  Is this
something that is possible with tablegen?

Thanks,
Tom Stellard







More information about the LLVMdev mailing list