[PATCH] Implement X86 code generation for musttail

Rafael Espíndola rafael.espindola at gmail.com
Tue Apr 29 11:29:57 PDT 2014


>> For example, we should be able to consider t4 in musttail.ll to have a sibcall, no?
>
> That would be a large, separate change for sibcall optimization, so I skipped it.
>
> Do you think it's important to finish off this sibcall improvement before continuing with musttail, or can it wait?

No, you have a good point. Changing sibcall is an optimization, so
there are treadoffs to be discussed. With musttail that is a
correctness problem and we can get that first.

> ================
> Comment at: lib/Target/X86/X86ISelLowering.cpp:2538
> @@ -2536,3 +2537,3 @@
>
> -  if (MF.getTarget().Options.DisableTailCalls)
> +  if (!IsMustTail && MF.getTarget().Options.DisableTailCalls)
>      isTailCall = false;
> ----------------
> Rafael Ávila de Espíndola wrote:
>> This is redundant with the following if. Maybe just leaving this if as is and moving the IsMustTail definition down would be easier to read?
> I agree

LGTM with the nits fixed.




More information about the llvm-commits mailing list