[llvm-commits] [llvm] r97797 - in /llvm/trunk: lib/Target/X86/X86ISelLowering.cpp test/CodeGen/X86/tailcall2.ll
Evan Cheng
evan.cheng at apple.com
Fri Mar 5 11:52:15 PST 2010
On Mar 5, 2010, at 2:18 AM, Duncan Sands wrote:
> Hi Evan,
>
>> Fix an oops in x86 sibcall optimization. If the ByVal callee argument is itself passed as a pointer, then it's obviously not safe to do a tail call.
>
>> + // define @foo(%struct.X* %A) {
>> + // tail call @bar(%struct.X* byval %A)
>> + // }
>
> in this case maybe the call should not have been marked "tailcall" in the
> first place? i.e. I'm suggesting that this is really a bug in
> TailRecursionElimination.
My understanding is it is correct. I find "tailcall" marker extremely confusing, but it's what we have for now.
Evan
>
>> + // ByVal argument is passed in as a pointer but it's now being
>> + // derefernced. e.g.
>
> derefernced -> dereferenced
>
> Ciao,
>
> Duncan.
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
More information about the llvm-commits
mailing list