<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 22, 2013, at 5:05 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>+  // 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>Yes, thanks.</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>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></div></blockquote><div><br></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> Thanks for the feedback, Jan.</div><div><br></div><div> Chad</div><div><br></div><div></div></div></body></html>