Callee prototype info in LowerCall()

Hello, I’m having trouble getting the function prototype of an ExternalSymbolSDNode inside TargetLowering::LowerCall(), this way i could get the original argument sizes before they’re legalized into smaller parts. I need this sort of information because depending on the originaltypes of the arguments i need to use some regs or others. I tried using the isSplit flag in ArgFlagsTy but it only marks the first splitted argument piece, so it’s not possible to know into how many pieces is the argument divided. So my question is how would i get this information or if it’s possible to add for example the original size of the argument into the OutputArg/InputArg structs or the piece number if the argument is splitted.