[PATCH] [fast-isel] x86_64 FastLowerArguments
Jan Voung
jvoung at chromium.org
Fri Feb 22 17:05:51 PST 2013
+ // Only handle simple cases. i.e. Up to 6 i32/i64 scalar arguments.
+ unsigned Idx = 1;
+ for (Function::const_arg_iterator I = F->arg_begin(), E = F->arg_end();
+ I != E; ++I, ++Idx) {
+ if (Idx > 6)
+ return false;
+
+ if (F->getAttributes().hasAttribute(Idx, Attribute::InReg) ||
+ F->getAttributes().hasAttribute(Idx, Attribute::StructRet) ||
+ F->getAttributes().hasAttribute(Idx, Attribute::ByVal))
+ return false;
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.
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?
On Fri, Feb 22, 2013 at 3:34 PM, Chad Rosier <mcrosier at apple.com> wrote:
> All,
> 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).
>
> Regards,
> Chad
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20130222/39d9973f/attachment.html>
More information about the llvm-commits
mailing list