[llvm] 2f9504a - Mips/GlobalISel: Use correct callee calling convention

Matt Arsenault via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 8 10:57:54 PDT 2021


Author: Matt Arsenault
Date: 2021-07-08T13:38:57-04:00
New Revision: 2f9504aa419b27d45e87db77476b9cf17feee4fb

URL: https://github.com/llvm/llvm-project/commit/2f9504aa419b27d45e87db77476b9cf17feee4fb
DIFF: https://github.com/llvm/llvm-project/commit/2f9504aa419b27d45e87db77476b9cf17feee4fb.diff

LOG: Mips/GlobalISel: Use correct callee calling convention

This was using the convention from the calling function.

Added: 
    

Modified: 
    llvm/lib/Target/Mips/MipsCallLowering.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/Target/Mips/MipsCallLowering.cpp b/llvm/lib/Target/Mips/MipsCallLowering.cpp
index 133cd2e72b7b6..1b9ecff0869aa 100644
--- a/llvm/lib/Target/Mips/MipsCallLowering.cpp
+++ b/llvm/lib/Target/Mips/MipsCallLowering.cpp
@@ -544,7 +544,7 @@ bool MipsCallLowering::lowerCall(MachineIRBuilder &MIRBuilder,
   } else
     MIB.add(Info.Callee);
   const TargetRegisterInfo *TRI = MF.getSubtarget().getRegisterInfo();
-  MIB.addRegMask(TRI->getCallPreservedMask(MF, F.getCallingConv()));
+  MIB.addRegMask(TRI->getCallPreservedMask(MF, Info.CallConv));
 
   TargetLowering::ArgListTy FuncOrigArgs;
   FuncOrigArgs.reserve(Info.OrigArgs.size());
@@ -572,7 +572,7 @@ bool MipsCallLowering::lowerCall(MachineIRBuilder &MIRBuilder,
     const Function *CF = static_cast<const Function *>(Info.Callee.getGlobal());
     IsCalleeVarArg = CF->isVarArg();
   }
-  MipsCCState CCInfo(F.getCallingConv(), IsCalleeVarArg, MF, ArgLocs,
+  MipsCCState CCInfo(Info.CallConv, IsCalleeVarArg, MF, ArgLocs,
                      F.getContext());
 
   CCInfo.AllocateStack(ABI.GetCalleeAllocdArgSizeInBytes(Info.CallConv),
@@ -620,7 +620,7 @@ bool MipsCallLowering::lowerCall(MachineIRBuilder &MIRBuilder,
     subTargetRegTypeForCallingConv(F, ArgInfos, OrigRetIndices, Ins);
 
     SmallVector<CCValAssign, 8> ArgLocs;
-    MipsCCState CCInfo(F.getCallingConv(), F.isVarArg(), MF, ArgLocs,
+    MipsCCState CCInfo(Info.CallConv, F.isVarArg(), MF, ArgLocs,
                        F.getContext());
 
     CCInfo.AnalyzeCallResult(Ins, TLI.CCAssignFnForReturn(), Info.OrigRet.Ty,


        


More information about the llvm-commits mailing list