Go to file
Oren Ben Simhon fe34c5e429 Disable Callee Saved Registers
Each Calling convention (CC) defines a static list of registers that should be preserved by a callee function. All other registers should be saved by the caller.
Some CCs use additional condition: If the register is used for passing/returning arguments – the caller needs to save it - even if it is part of the Callee Saved Registers (CSR) list.
The current LLVM implementation doesn’t support it. It will save a register if it is part of the static CSR list and will not care if the register is passed/returned by the callee.
The solution is to dynamically allocate the CSR lists (Only for these CCs). The lists will be updated with actual registers that should be saved by the callee.
Since we need the allocated lists to live as long as the function exists, the list should reside inside the Machine Register Info (MRI) which is a property of the Machine Function and managed by it (and has the same life span).
The lists should be saved in the MRI and populated upon LowerCall and LowerFormalArguments.
The patch will also assist to implement future no_caller_saved_regsiters attribute intended for interrupt handler CC.

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

llvm-svn: 297715
2017-03-14 09:09:26 +00:00
clang [CodeGen][ObjC] Fix a bug where the type of an ivar wasn't encoded 2017-03-14 04:00:52 +00:00
clang-tools-extra Add the 'AllowSoleDefaultDtor' and 'AllowMissingMoveFunctions' options to the cppcoreguidelines-special-member-functions check. 2017-03-13 21:39:00 +00:00
compiler-rt [Builtin][AArch64] Fix build errors of test cases 2017-03-14 00:44:15 +00:00
debuginfo-tests New round of fixes for "Always compile debuginfo-tests for the host triple" 2014-10-18 23:47:59 +00:00
libclc math: Implement sinh function 2017-02-25 02:46:53 +00:00
libcxx Fix cmake to find the compiler-rt libs on darwin 2017-03-14 04:12:29 +00:00
libcxxabi Fully Reformat fallback_malloc.cpp 2017-03-04 03:23:15 +00:00
libunwind Fix up the places where AddressSpace.hpp is included. 2017-03-09 08:04:07 +00:00
lld [ELF] - Step to combine LinkerScript and LinkerScriptBase 2017-03-14 09:03:53 +00:00
lldb update. 2017-03-14 03:28:27 +00:00
llgo [llgo] Remove support for LLVM attributes 2016-12-06 19:22:04 +00:00
llvm Disable Callee Saved Registers 2017-03-14 09:09:26 +00:00
openmp Create a git ignore file for openmp runtime. 2017-03-11 13:05:08 +00:00
parallel-libs [Axccel] Remove -Wno-missing-braces in build 2016-12-19 21:34:07 +00:00
polly Preserve the isl-noexceptions.h C++ bindings when updating isl 2017-03-14 07:46:28 +00:00