aboutsummaryrefslogtreecommitdiff
path: root/flang/lib/Frontend/CompilerInvocation.cpp
diff options
context:
space:
mode:
authorCraig Topper <craig.topper@sifive.com>2024-04-10 10:28:54 -0700
committerGitHub <noreply@github.com>2024-04-10 10:28:54 -0700
commitf27f3697108470c3e995cf3cb454641c22ec1fa9 (patch)
tree2a688d58b31c66d0b737b09dadcf6fda16a36e46 /flang/lib/Frontend/CompilerInvocation.cpp
parentc54afe5c33ca6159841d909fb8fe20e5d4e0069b (diff)
downloadllvm-f27f3697108470c3e995cf3cb454641c22ec1fa9.zip
llvm-f27f3697108470c3e995cf3cb454641c22ec1fa9.tar.gz
llvm-f27f3697108470c3e995cf3cb454641c22ec1fa9.tar.bz2
[RISCV] Remove interrupt handler special case from RISCVFrameLowering::determineCalleeSaves. (#88069)
This code was trying to save temporary argument registers in interrupt handler functions that contain calls. With the exception that all FP registers are saved including the normally callee saved registers. If all of the callees use an FP ABI and the interrupt handler doesn't touch the normally callee saved FP registers, we don't need to save them. It doesn't appear that we need to special case functions with calls. The normal callee saved register handling will already check each of the calls and consider a register clobbered if the call doesn't explicitly say it is preserved. All of the test changes are from the removal of the FP callee saved registers. There are tests for interrupt handlers with F and D extension that use ilp32 or lp64 ABIs that are not affected by this change. They still save the FP callee saved registers as they should. gcc appears to have a bug where the D extension being enabled with the ilp32f or lp64f ABI does not save the FP callee saved regs. The callee would only save/restore the lower 32 bits and clobber the upper bits. LLVM saves the FP callee saved regs in this case and there is an unchanged test for it. The unnecessary save/restore was raised in this thread https://discourse.llvm.org/t/has-bugs-when-optimizing-save-restore-csrs-by-changing-csr-xlen-f32-interrupt/78200/1
Diffstat (limited to 'flang/lib/Frontend/CompilerInvocation.cpp')
0 files changed, 0 insertions, 0 deletions