[PATCH] [fast-isel] x86_64 FastLowerArguments
Chad Rosier
mcrosier at apple.com
Mon Feb 25 10:01:30 PST 2013
On Feb 22, 2013, at 5:05 PM, Jan Voung <jvoung at chromium.org> wrote:
> + // 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.
Yes, thanks.
> 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?
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.
Revised patch attached. Test case added that uses the new -fast-isel-abort-args option.
Thanks for the feedback, Jan.
Chad
>
>
>
> 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/20130225/8934890b/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: x86-64-fast-lower-arguments.patch
Type: application/octet-stream
Size: 4928 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20130225/8934890b/attachment.obj>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20130225/8934890b/attachment-0001.html>
More information about the llvm-commits
mailing list