[LLVMdev] Constraints

David Greene dag at cray.com
Wed Jun 18 11:41:46 PDT 2008


On Wednesday 18 June 2008 01:30, Evan Cheng wrote:
> On Jun 17, 2008, at 1:36 PM, David Greene wrote:
> > Can someone explain the Constraints system in X86*.td?
> >
> > For example:
> >
> > let Constraints = "$src1 = $dst"
> >
> > This replaces isTwoAddress (according to svn logs), which I gather
> > is how
> > two-address instructions used to be marked for X86.
>
> You're right. This is the same as isTwoAddress, just more flexible.

Ok, but what are the implications for the rest of llvm?  What does this
constrait say to later phases?  Is it a requirement that all two-address
instructions have this constraint or does it just enable more optimization?
That is, is functional correctness tied to using this constraint?

> > Except isTwoAddress is still used in X86InstInfo.td.
>
> Because I haven't replaced all uses of isTwoAddress with constraints,
> that's all.

Gotcha.  Thanks.

                                                -Dave



More information about the llvm-dev mailing list