[PATCH] musttail: Forward regparms of variadic functions on x86_64
David Majnemer
david.majnemer at gmail.com
Fri Aug 29 13:34:28 PDT 2014
================
Comment at: lib/CodeGen/SelectionDAG/FunctionLoweringInfo.cpp:151
@@ +150,3 @@
+ // forward implicit register parameters.
+ if (auto *CI = dyn_cast<CallInst>(I)) {
+ if (CI->isMustTailCall() && Fn->isVarArg())
----------------
`if (const auto *CI = dyn_cast<CallInst>(I)) {` would be a little nicer when considering that `I` is a `const_iterator`.
================
Comment at: lib/Target/X86/X86ISelLowering.cpp:2291-2296
@@ +2290,8 @@
+ assert(Subtarget->is64Bit());
+ if (Subtarget->isCallingConvWin64(CallConv)) {
+ // The XMM registers which might contain var arg parameters are shadowed
+ // in their paired GPR. So we only need to save the GPR to their home
+ // slots.
+ return None;
+ }
+
----------------
Do we want a TODO here for vectorcall?
http://reviews.llvm.org/D5060
More information about the llvm-commits
mailing list