On Mon, 15 May 2006, Vladimir Prus wrote:> say I have two register classes GR and AR, and a move instruction that can
> move one register to another, no matter what the class is. What's the
best
> way to describe the operands DAG?
>
> If I just write
>
> (ops GR:$src, GR:$dst)
>
> this will cover 1/4 of all possible combinations, and writing 4
instructions
> variants is troublesome. Is there any syntax that write something:
>
> pseudo-class R32 = GR | AR;
> (opts R32:$src, R32:$dst);
Unfortunately, no not yet. You have to write all permutations. There are
several target-description/register-allocation issues that are slowly
being addressed, this is one of them. In the short term, writing all
permutations is the easiest thing to do.
-Chris
--
http://nondot.org/sabre/
http://llvm.org/