[PATCH] Implement X86 code generation for musttail
Rafael Ávila de Espíndola
rafael.espindola at gmail.com
Mon Apr 28 20:36:37 PDT 2014
Would it be possible to instead change IsEligibleForTailCallOptimization to allow sib calls in cases where arguments have to be updated? For example, we should be able to consider t4 in musttail.ll to have a sibcall, no?
================
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;
----------------
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?
================
Comment at: lib/Target/X86/X86ISelLowering.cpp:2546
@@ +2545,3 @@
+ isTailCall = true;
+ IsSibcall = false;
+ } else if (isTailCall) {
----------------
IsSibcall is already false in here.
http://reviews.llvm.org/D3493
More information about the llvm-commits
mailing list