<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><br></div><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><br></div><div><br></div></div><div class="gmail_extra">
<br><br><div class="gmail_quote">On Fri, Feb 22, 2013 at 3:34 PM, Chad Rosier <span dir="ltr"><<a href="mailto:mcrosier@apple.com" target="_blank">mcrosier@apple.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc 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>
  Chad<br>
<br>
<br>_______________________________________________<br>
llvm-commits mailing list<br>
<a href="mailto:llvm-commits@cs.uiuc.edu">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><br>
<br></blockquote></div><br></div>