<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><br><div><div>On Dec 15, 2009, at 5:08 PM, David Greene wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div>On Tuesday 15 December 2009 18:01, Jim Grosbach wrote:<br><br><blockquote type="cite">For a usage example, I've included in the patch the modification to<br></blockquote><blockquote type="cite">use the constraint for the STREX ARM instruction.<br></blockquote><br>Your example is:<br><br>constraints = "@early $success"<br><br>Why not spell it as:<br><br>constraints = "$success != $src", "$success != $ptr"<br><br></div></blockquote><div><br></div><div>This was my first thought as well; however, I decided against it. I think it's best, at least for now, to expose an  interface in tablegen to express the early-clobber semantics that the back-end already supports rather than adding something completely new.</div><div><br></div><div>Doing more would require significantly surgery on both tablegen and the register allocation framework to support. The handling of early-clobber register definitions is already in place in the allocator, and this approach simply provides a means of specifying it in the tablegen files. I think that's likely something we'd want separately from a more general purpose solution in any case, as it's analogous to the inline assembler '&' constraint, for example.</div><div><br></div><div>Do you have specific examples in mind that would be expressible with something more complicated that aren't handleable via an early-clobber constraint?</div><br><blockquote type="cite"><div>The grammar would change to something like:<br><br>constraint: operand '!=' operand<br>  | operand '=' operand<br><br>This seems more intuitive and more generally applicable.  I could see a use<br>for this in other architectures.  From reading your example, without the <br>background I wouldn't know what "@early" means.<font class="Apple-style-span" color="#000000"><font class="Apple-style-span" color="#144FAE"><br></font></font></div></blockquote><div><br></div><div>Perhaps spelling it out more fully with "earlyclobber" rather than "early" would help?</div><div><br></div><div>Thanks for the feedback!</div><div><br></div><div>-Jim</div></div></body></html>