Hi LLVM developers,
Motivation:
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!
Regards,
Leslie Zhai
ValueHandler::assignArg
As Alex suggested, I pass a nullptr AssignFn for making immediate progress firstly in D41653, but we will change approach prior in D41700.
Please give me some suggestion about this change, thanks for your teaching!