Add support for sib/tail calling calls whose calling convention differs from the caller's.
- Port over CCState::resultsCombatible from CallingConvLower.cpp into CallLowering. This is used to verify that the way the caller and callee CC handle incoming arguments matches up.
- Add CallLowering::analyzeCallResult. This is basically a port of CCState::AnalyzeCallResult, but using ArgInfo rather than ISD::InputArg.
- Add AArch64CallLowering::doCallerAndCalleePassArgsTheSameWay. This checks that the calling conventions are compatible, and that the caller and callee preserve the same registers.
For testing:
- Update call-translator-tail-call.ll to show that we can now handle mismatched calling conventions.
- Add a GISel line to tailcall-ccmismatch.ll to show that we will not tail call when the regmasks don't line up.