[llvm] [X86] Don't save/restore fp around longjmp instructions (PR #102556)
via llvm-commits
llvm-commits at lists.llvm.org
Thu Aug 15 13:17:41 PDT 2024
================
@@ -174,6 +175,9 @@ class X86MachineFunctionInfo : public MachineFunctionInfo {
bool FPClobberedByCall = false;
bool BPClobberedByCall = false;
+ // A set of instructions clobber FP generated from longjmp.
+ SmallSet<MachineInstr *, 2> LongJmpMIClobberFP;
----------------
weiguozhi wrote:
Longjmp modifies fp and sp, these instructions can be treated as destroying current stack frame and setting up stack frame for the jump target.
How about set FrameDestroy flag for these longjmp instructions, then spillFPBP can ignore these instructions.
https://github.com/llvm/llvm-project/pull/102556
More information about the llvm-commits
mailing list