[PATCH] [PATCH] Fix for http://llvm.org/bugs/show_bug.cgi?id=19905

Sanjoy Das sanjoy at playingwithpointers.com
Fri Jun 6 16:36:33 PDT 2014


Hi vadimcn, asl,

This patch fixes issue 19905.  This solution isn't as clean as I'd
like it to be, but I haven't been able to come up with something that
would be both cleaner and not super invasive.

Another possible fix for this that seems cleaner to me is to have the
x86 spillCalleeSavedRegisters routine emit MOVs and not PUSHes (except
maybe for %rbp, to spare the debugger), with MO_FrameIndex operands.
These MOV instructions could then be peephole-optimized into sequences
of PUSHes and POPs if possible, after the frame indices have been
mapped to actual stack slot offsets.  I'm not sure how feasible this
is, though.

http://reviews.llvm.org/D4052

Files:
  include/llvm/Target/TargetFrameLowering.h
  lib/CodeGen/PrologEpilogInserter.cpp
  lib/CodeGen/PrologEpilogInserter.h
  lib/Target/AArch64/AArch64FrameLowering.cpp
  lib/Target/AArch64/AArch64FrameLowering.h
  lib/Target/ARM/ARMFrameLowering.cpp
  lib/Target/ARM/ARMFrameLowering.h
  lib/Target/ARM/Thumb1FrameLowering.cpp
  lib/Target/ARM/Thumb1FrameLowering.h
  lib/Target/Hexagon/HexagonFrameLowering.cpp
  lib/Target/Hexagon/HexagonFrameLowering.h
  lib/Target/MSP430/MSP430FrameLowering.cpp
  lib/Target/MSP430/MSP430FrameLowering.h
  lib/Target/Mips/Mips16FrameLowering.cpp
  lib/Target/Mips/Mips16FrameLowering.h
  lib/Target/Mips/MipsSEFrameLowering.cpp
  lib/Target/Mips/MipsSEFrameLowering.h
  lib/Target/PowerPC/PPCFrameLowering.cpp
  lib/Target/PowerPC/PPCFrameLowering.h
  lib/Target/SystemZ/SystemZFrameLowering.cpp
  lib/Target/SystemZ/SystemZFrameLowering.h
  lib/Target/X86/X86FrameLowering.cpp
  lib/Target/X86/X86FrameLowering.h
  lib/Target/XCore/XCoreFrameLowering.cpp
  lib/Target/XCore/XCoreFrameLowering.h
  test/CodeGen/X86/pr19905.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D4052.10198.patch
Type: text/x-patch
Size: 23393 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20140606/c7298a44/attachment.bin>


More information about the llvm-commits mailing list