kparzysz added a comment. Can't you just change X86FrameLowering::determineCalleeSaves? The registers used to pass arguments to a function are already listed as live-in to the function in MRI. Repository: rL LLVM https://reviews.llvm.org/D28566