[X86] Support of no_caller_saved_registers attribute
authorOren Ben Simhon <oren.ben.simhon@intel.com>
Wed, 3 May 2017 13:07:19 +0000 (13:07 +0000)
committerOren Ben Simhon <oren.ben.simhon@intel.com>
Wed, 3 May 2017 13:07:19 +0000 (13:07 +0000)
commitdbd4bba1ece18ccfbdec969ec0d05aed2e151d53
treea0cf943fc7adc5b8121c8436e0ed2355fc3db848
parentef5798acf5ea024f69f012abfbec1cdfe2e44cd0
[X86] Support of no_caller_saved_registers attribute

This patch implements the LLVM part for no_caller_saved_registers attribute as appears here: https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=5ed3cc7b66af4758f7849ed6f65f4365be8223be.
In order to implement the attribute, we use the dynamic CSR mechanism to remove returned/passed arguments from the function regmask/CSR list.

Differential Revision: https://reviews.llvm.org/D31876

llvm-svn: 302020
llvm/lib/Target/X86/X86FastISel.cpp
llvm/lib/Target/X86/X86ISelLowering.cpp
llvm/lib/Target/X86/X86RegisterInfo.cpp
llvm/test/CodeGen/X86/x86-32-intrcc.ll
llvm/test/CodeGen/X86/x86-64-intrcc.ll
llvm/test/CodeGen/X86/x86-no_caller_saved_registers-preserve.ll [new file with mode: 0644]
llvm/test/CodeGen/X86/x86-no_caller_saved_registers.ll [new file with mode: 0644]