[RISCV] Only mark fp as reserved if the function has a dedicated frame pointer
authorAlex Bradbury <asb@lowrisc.org>
Wed, 13 Mar 2019 16:33:45 +0000 (16:33 +0000)
committerAlex Bradbury <asb@lowrisc.org>
Wed, 13 Mar 2019 16:33:45 +0000 (16:33 +0000)
commit8a70468a2700b28d96199551710a68c92515ce3a
tree9cdf8c3fc73405cf6c93add50272ba5ecabd2ff5
parentcd74127d28c1dc78be18cea55e6a7c65ef382c88
[RISCV] Only mark fp as reserved if the function has a dedicated frame pointer

This follows similar logic in the ARM and Mips backends, and allows the free
use of s0 in functions without a dedicated frame pointer. The changes in
callee-saved-gprs.ll most clearly show the effect of this patch.

llvm-svn: 356063
20 files changed:
llvm/lib/Target/RISCV/RISCVRegisterInfo.cpp
llvm/test/CodeGen/RISCV/atomic-rmw.ll
llvm/test/CodeGen/RISCV/bswap-ctlz-cttz-ctpop.ll
llvm/test/CodeGen/RISCV/callee-saved-gprs.ll
llvm/test/CodeGen/RISCV/calling-conv-ilp32-ilp32f-common.ll
llvm/test/CodeGen/RISCV/calling-conv-ilp32-ilp32f-ilp32d-common.ll
llvm/test/CodeGen/RISCV/calling-conv-ilp32.ll
llvm/test/CodeGen/RISCV/calling-conv-lp64-lp64f-common.ll
llvm/test/CodeGen/RISCV/calling-conv-lp64.ll
llvm/test/CodeGen/RISCV/calls.ll
llvm/test/CodeGen/RISCV/double-intrinsics.ll
llvm/test/CodeGen/RISCV/double-mem.ll
llvm/test/CodeGen/RISCV/float-br-fcmp.ll
llvm/test/CodeGen/RISCV/float-intrinsics.ll
llvm/test/CodeGen/RISCV/float-mem.ll
llvm/test/CodeGen/RISCV/large-stack.ll
llvm/test/CodeGen/RISCV/remat.ll
llvm/test/CodeGen/RISCV/rv32i-rv64i-float-double.ll
llvm/test/CodeGen/RISCV/umulo-128-legalisation-lowering.ll
llvm/test/CodeGen/RISCV/vararg.ll