[all-commits] [llvm/llvm-project] 0d471b: Spill/restore FP/BP around instructions in which t...
weiguozhi via All-commits
all-commits at lists.llvm.org
Tue Aug 6 16:18:42 PDT 2024
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 0d471b3f64d3116bd57c79d872f7384fff80daa5
https://github.com/llvm/llvm-project/commit/0d471b3f64d3116bd57c79d872f7384fff80daa5
Author: weiguozhi <57237827+weiguozhi at users.noreply.github.com>
Date: 2024-08-06 (Tue, 06 Aug 2024)
Changed paths:
M llvm/include/llvm/CodeGen/TargetFrameLowering.h
M llvm/lib/CodeGen/CFIInstrInserter.cpp
M llvm/lib/CodeGen/PrologEpilogInserter.cpp
M llvm/lib/Target/X86/X86FrameLowering.cpp
M llvm/lib/Target/X86/X86FrameLowering.h
M llvm/test/CodeGen/X86/apx/push2-pop2-vector-register.ll
M llvm/test/CodeGen/X86/apx/push2-pop2.ll
M llvm/test/CodeGen/X86/apx/pushp-popp.ll
M llvm/test/CodeGen/X86/avx512-intel-ocl.ll
A llvm/test/CodeGen/X86/clobber_base_ptr.ll
A llvm/test/CodeGen/X86/clobber_frame_ptr.ll
A llvm/test/CodeGen/X86/clobber_frame_ptr_x32.ll
M llvm/test/CodeGen/X86/i386-baseptr.ll
M llvm/test/CodeGen/X86/inline-asm-function-call-pic.ll
M llvm/test/CodeGen/X86/x86-32-intrcc.ll
M llvm/test/CodeGen/X86/x86-64-baseptr.ll
M llvm/test/CodeGen/X86/x86-64-flags-intrinsics.ll
Log Message:
-----------
Spill/restore FP/BP around instructions in which they are clobbered (#81048)
This patch fixes https://github.com/llvm/llvm-project/issues/17204.
If a base pointer is used in a function, and it is clobbered by an
instruction (typically an inline asm), current register allocator can't
handle this situation, so BP becomes garbage after those instructions.
It can also occur to FP in theory.
We can spill and reload FP/BP registers around those instructions. But
normal spill/reload instructions also use FP/BP, so we can't spill them
into normal spill slots, instead we spill them into the top of stack by
using SP register.
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list