[LLVMdev] Simpler types in TableGen isel patterns

Jakob Stoklund Olesen stoklund at 2pi.dk
Thu Mar 21 12:59:19 PDT 2013

On Mar 21, 2013, at 12:00 PM, Hal Finkel <hfinkel at anl.gov> wrote:
> I think this is a good idea.
> Is there a reason why we need the types again in the expansion? Would it be easy to make the syntax like this?
>  def : Pat<(and (not i64:$src1), i64:$src2),
>            (ANDN64rr     $src1,      $src2)>;

That's just a quirk of the generic TableGen DAG syntax.

The 'i64' is the actual operand, and '$src1' is the name of the operand. The name is optional, but the operand itself is not.

It wouldn't be that hard to make the parser treat $src2 as ?:$src2 where '?' represents an UndefInit.


More information about the llvm-dev mailing list