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. Except isTwoAddress is still used in X86InstInfo.td. So what gives? What do these two properties actually do? -Dave
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.> > > Except isTwoAddress is still used in X86InstInfo.td.Because I haven't replaced all uses of isTwoAddress with constraints, that's all. Evan> > > So what gives? What do these two properties actually do? > > -Dave > _______________________________________________ > LLVM Developers mailing list > LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
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