The attachment supersedes the previous patch. It incorporates some feedback from Anton and takes the next step of merging the largely duplicated calling convention logic in X86ISelLowering.
- LowerCCCArguments, LowerX86_64CCCArguments and LowerFastCCArguments are merged and inlined directly into LowerFORMAL_ARGUMENTS.
- I moved LowerFORMAL_ARGUMENTS to the location where LowerCCCArguments was in order to facilitate review (otherwise the diff would contain no useful deltas), but it should go back where it belongs afterwards.
- LowerX86_64CCCCallTo and LowerX86_64CCCCallTo were consolidated with LowerCCCCallTo.
- I haven’t yet tackled merging LowerCCCCallTo and LowerTailCallTo.
There net savings is 405 LOC.
I’d appreciate tests on Windows and x86-64 hosts, since some of the logic was rather convoluted.
x86cconv.patch (46.4 KB)