[PATCH] Allow tail call optimization through multiple/nested struct extractions/insertions
Stephen Lin
swlin at post.harvard.edu
Fri Apr 19 10:31:57 PDT 2013
> This part confuses a bit:
>
> +static bool sameNoopInput(const Value *V1, const Value *V2,
> + SmallVectorImpl<unsigned> &Els1,
> + SmallVectorImpl<unsigned> &Els2,
> + const TargetLowering &TLI) {
> + using std::swap;
> + bool swapParity;
> + bool isSame = sameNoopInput(V1, V2, Els1, Els2, swapParity, TLI);
> + if (swapParity) {
> + // Revert to origin Els1 and Els2 to avoid confusing recursive calls
> + swap(V1, V2);
> + swap(Els1, Els2);
> + }
> + return isSame;
> +}
>
> Why is it necessary to swap V1 and V2? They are not passed by reference. Otherwise, I don't see any issue with the patch. Please update it and if LNT testing looks fine please commit the patch.
>
Oh, that's embarrassing :) I got rid of that and consolidated it back
into one function.
Yes, LNT looks fine. Also, I don't have commit access, actually, so
could you commit for me?
Thanks,
Stephen
-------------- next part --------------
A non-text attachment was scrubbed...
Name: tail-call-nested-struct.patch
Type: application/octet-stream
Size: 11391 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20130419/71730a4f/attachment.obj>
More information about the llvm-commits
mailing list