[llvm-commits] [llvm] r51699 - in /llvm/trunk: lib/Target/Target.td lib/Target/TargetSelectionDAG.td lib/Target/X86/X86ISelDAGToDAG.cpp lib/Target/X86/X86InstrInfo.td utils/TableGen/CodeGenDAGPatterns.cpp utils/TableGen/CodeGenInstruction.cpp utils/TableGen/DAGISelEmitter.cpp utils/TableGen/InstrInfoEmitter.cpp

Chris Lattner clattner at apple.com
Thu May 29 18:52:39 PDT 2008


On May 29, 2008, at 12:57 PM, Dan Gohman wrote:
> URL: http://llvm.org/viewvc/llvm-project?rev=51699&view=rev
> Log:
> Fix a tblgen problem handling variable_ops in tblgen instruction
> definitions. This adds a new construct, "discard", for indicating
> that a named node in the input matching pattern is to be discarded,
> instead of corresponding to a node in the output pattern. This
> allows tblgen to know where the arguments for the varaible_ops are
> supposed to begin.

Very nice!

> +def immAllZeros : PatLeaf<(imm), [{ return N->isNullValue(); }]>;

> @@ -322,9 +322,9 @@
> // Return instructions.
> let isTerminator = 1, isReturn = 1, isBarrier = 1,
>     hasCtrlDep = 1, FPForm = SpecialFP, FPFormBits = SpecialFP.Value  
> in {
> -  def RET    : I   <0xC3, RawFrm, (outs), (ins variable_ops),
> +  def RET    : I   <0xC3, RawFrm, (outs), (ins discard:$amt,  
> variable_ops),
>                     "ret",
> -                    [/*(X86retflag 0)*/ /*FIXME: Disabled: rdar://5791600*/ 
> ]>;
> +                    [(X86retflag immAllZeros:$amt)]>;

Does it work if you just use '0' instead of immAllZeros or do you need  
a name?  Does 0:$amt work?

-Chris



More information about the llvm-commits mailing list