[llvm-commits] [llvm] r41897 - in /llvm/trunk: lib/Target/TargetSelectionDAG.td utils/TableGen/DAGISelEmitter.cpp utils/TableGen/DAGISelEmitter.h

Chris Lattner clattner at apple.com
Wed Sep 12 18:00:14 PDT 2007


> Initial support for multi-result patterns:
> 1.
> [(set GR32:$dst, (add GR32:$src1, GR32:$src2)),
>  (modify EFLAGS)]
> This indicates the source pattern expects the instruction would  
> produce 2 values. The first is the result of the addition. The  
> second is an implicit definition in register EFLAGS.

Nice!

> 2.
> def : Pat<(parallel (addc GR32:$src1, GR32:$src2), (modify  
> EFLAGS)), ()>
> Similar to #1 except this is used for def : Pat patterns.

Do we really need this?  Pat is just defined as:

// Pat - A simple (but common) form of a pattern, which produces a  
simple result
// not needing a full list.
class Pat<dag pattern, dag result> : Pattern<pattern, [result]>;

I would be straight-forward to define a version that took a list  
explicitly.  Also, what does it mean to match on a modify of EFLAGS?

-Chris




More information about the llvm-commits mailing list