<html><head><meta http-equiv="Content-Type" content="text/html charset=iso-8859-1"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;"><br><div><div>On Feb 25, 2013, at 12:50 PM, Jan Voung <<a href="mailto:jvoung@chromium.org">jvoung@chromium.org</a>> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div style="letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;"><div dir="ltr"><div class="gmail_extra">On Mon, Feb 25, 2013 at 10:01 AM, Chad Rosier<span class="Apple-converted-space"> </span><span dir="ltr"><<a href="mailto:mcrosier@apple.com" target="_blank">mcrosier@apple.com</a>></span><span class="Apple-converted-space"> </span>wrote:<br></div><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin: 0px 0px 0px 0.8ex; border-left-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: solid; padding-left: 1ex;"><div style="word-wrap: break-word;"><br><div><div><div>On Feb 22, 2013, at 5:05 PM, Jan Voung <<a href="mailto:jvoung@chromium.org" target="_blank">jvoung@chromium.org</a>> wrote:</div><br><blockquote type="cite"><div style="letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px;"><div dir="ltr"><div>+  // Only handle simple cases. i.e. Up to 6 i32/i64 scalar arguments.</div><div>+  unsigned Idx = 1;</div><div>+  for (Function::const_arg_iterator I = F->arg_begin(), E = F->arg_end();</div><div>+       I != E; ++I, ++Idx) {</div><div>+    if (Idx > 6)</div><div>+      return false;</div><div>+</div><div>+    if (F->getAttributes().hasAttribute(Idx, Attribute::InReg) ||</div><div>+        F->getAttributes().hasAttribute(Idx, Attribute::StructRet) ||</div><div>+        F->getAttributes().hasAttribute(Idx, Attribute::ByVal))</div><div>+      return false;</div><div><br></div><div>Do parameters with the nest attribute need to be checked too?  The CC_X86_64_C .td definition has special treatment for that, using r10 as the static chain register.</div></div></div></blockquote><div><br></div></div><div>Yes, thanks.</div></div></div></blockquote><div><br></div><div>I wonder if these multiple attribute checks get optimized to decent/fast code by the compiler.  Some of attributes can be pretty rare for x86-64 (e.g., InReg?)?</div></div></div></div></div></blockquote><div><br></div><div>Bill, do you have any comment here since you've been doing a lot of work on the Attributes?  I assume the lookups aren't terribly slow, but also not super efficient.</div><div><br></div><div>Would it be beneficial to expose an API to allow multiple checks with a single call to hasAttributes?   E.g.,</div><div><br></div><div>  hasAttribute(Idx, Attribute::InReg, Attribute::StructReg, Attribute::ByVal);</div><br><blockquote type="cite"><div style="letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><div> </div><blockquote class="gmail_quote" style="margin: 0px 0px 0px 0.8ex; border-left-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: solid; padding-left: 1ex; position: static; z-index: auto;"><div style="word-wrap: break-word;"><div><br><blockquote type="cite"><div style="letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px;"><div dir="ltr">Also, would it be worth adding a test that checks that N basic blocks were truly selected by fast isel, according to the "-stats" output?</div></div></blockquote><div><br></div></div><div>I've added a new llc flag, -fast-isel-abort-args, which is the same as fast-isel-abort, but is for formal argument lowering only.</div><div><br></div><div>Revised patch attached.  Test case added that uses the new -fast-isel-abort-args option.</div><div><br></div></div></blockquote><div><br></div><div>Thanks, looks pretty good. </div><div> </div><blockquote class="gmail_quote" style="margin: 0px 0px 0px 0.8ex; border-left-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: solid; padding-left: 1ex;"><div style="word-wrap: break-word;"><div></div><div> Thanks for the feedback, Jan.</div><span><font color="#888888"><div><br></div><div> Chad</div><div><br></div><div></div></font></span></div><br><div style="word-wrap: break-word;"><div></div><br><blockquote type="cite"><div style="letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px;"><div dir="ltr"><br></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Fri, Feb 22, 2013 at 3:34 PM, Chad Rosier<span> </span><span dir="ltr"><<a href="mailto:mcrosier@apple.com" target="_blank">mcrosier@apple.com</a>></span><span> </span>wrote:<br><blockquote class="gmail_quote" style="margin: 0px 0px 0px 0.8ex; border-left-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: solid; padding-left: 1ex;">All,<br>The attached patch implements a basic version of FastLowerArguments for x86 fast-isel.  This is analogous to Evan's commit r174855, but for x86 of course.  Please have a look (especially those familiar with x86 calling conventions).<br><br> Regards,<br> <span> </span>Chad<br><br><br>_______________________________________________<br>llvm-commits mailing list<br><a href="mailto:llvm-commits@cs.uiuc.edu" target="_blank">llvm-commits@cs.uiuc.edu</a><br><a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits</a></blockquote></div></div></div></blockquote></div></blockquote></div></div></div></div></blockquote></div><br></body></html>