Hi LLVM developers,
As Alex suggested , I refactory handleAssignments in the CallLowering, so it is able to override handleAssignments in your <Target>CallLowering to initial your <Target>CCState, for example:
RISCVCCState CCInfo(F.getCallingConv(), F.isVarArg(), MF, ArgLocs, F.getContext() ...); // Add more custom variables to meet your Target's requirement
And it also need to override assignArg in your <Target>CallLowering, cast CCState to custom <Target>CCState, then do some target-specific treatment.
Please review my patch, and give me some suggestion, thanks for your teaching!