Custom call lowering - where?

I’ve made reasonable progress with this. CallingConv.td appears to be a description of what the call lowering is going to do, not a means of altering the DAG. The target functions LowerCall, LowerFormalArguments, LowerReturn control the DAG modifications.

Intercepting the SDValues en route to and from the call in these three functions appears to suffice. Looks a bit hackish though, better suggestions still welcome.

Cheers