llvm.org GIT mirror llvm / 039f6c6
Add a const and munge some comments git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@216781 91177308-0d34-0410-b5e6-96231b3b80d8 Reid Kleckner 6 years ago
2 changed file(s) with 6 addition(s) and 4 deletion(s). Raw diff Collapse all Expand all
147147
148148 // If we have a musttail call in a variadic funciton, we need to ensure we
149149 // forward implicit register parameters.
150 if (auto *CI = dyn_cast(I)) {
150 if (const auto *CI = dyn_cast(I)) {
151151 if (CI->isMustTailCall() && Fn->isVarArg())
152152 MF->getFrameInfo()->setHasMustTailInVarArgFunc(true);
153153 }
23252325 }
23262326 }
23272327
2328 // FIXME: Get this from tablegen.
23282329 static ArrayRef get64BitArgumentGPRs(CallingConv::ID CallConv,
23292330 const X86Subtarget *Subtarget) {
23302331 assert(Subtarget->is64Bit());
23422343 return GPR64ArgRegs64Bit;
23432344 }
23442345
2346 // FIXME: Get this from tablegen.
23452347 static ArrayRef get64BitArgumentXMMs(MachineFunction &MF,
23462348 CallingConv::ID CallConv,
23472349 const X86Subtarget *Subtarget) {
23502352 // The XMM registers which might contain var arg parameters are shadowed
23512353 // in their paired GPR. So we only need to save the GPR to their home
23522354 // slots.
2355 // TODO: __vectorcall will change this.
23532356 return None;
23542357 }
23552358
26122615 if (!MemOps.empty())
26132616 Chain = DAG.getNode(ISD::TokenFactor, dl, MVT::Other, MemOps);
26142617 } else {
2615 // TODO: Save virtual registers away some where so we can do
2616 // getCopyFromReg in the musttail call lowering bb.
2618 // Add all GPRs, al, and XMMs to the list of forwards. We will add then
2619 // to the liveout set on a musttail call.
26172620 assert(MFI->hasMustTailInVarArgFunc());
26182621 auto &Forwards = FuncInfo->getForwardedMustTailRegParms();
26192622 typedef X86MachineFunctionInfo::Forward Forward;
26202623
2621 // Add all GPRs, al, and XMMs to the list of forwards.
26222624 for (unsigned I = 0, E = LiveGPRs.size(); I != E; ++I) {
26232625 unsigned VReg =
26242626 MF.getRegInfo().createVirtualRegister(&X86::GR64RegClass);