[PATCH] D12483: [PATCH 2/2] [x86] Add support for "probe-stack"

John Kåre Alsaker via llvm-commits llvm-commits at lists.llvm.org
Sun Aug 30 13:10:18 PDT 2015


Zoxc created this revision.
Zoxc added a reviewer: majnemer.
Zoxc added subscribers: qcolombet, llvm-commits.
Zoxc set the repository for this revision to rL LLVM.

This is an alternative to http://reviews.llvm.org/D9654

Stack probes are done in an loop in the prologue instead of calling external functions.

Note that when modifying basic blocks in the emitPrologue the epilog will be inserted into the wrong basic block. This is because
the basic blocks to insert epilogs into is calculated before
emitPrologue is called.
I fixed this by adding the following code after the emitPrologue call
in PEI::insertPrologEpilogCode:

  RestoreBlocks.clear();
  calculateSets(Fn);

This doesn't seem like a very nice solution.

Another thing is that I'm not sure that I modified all the test for stack probing correctly (there were quite a few cases of it).

Repository:
  rL LLVM

http://reviews.llvm.org/D12483

Files:
  include/llvm/CodeGen/MachineFunction.h
  lib/CodeGen/MachineFunction.cpp
  lib/CodeGen/PrologEpilogInserter.cpp
  lib/Target/X86/X86FrameLowering.cpp
  lib/Target/X86/X86FrameLowering.h
  lib/Target/X86/X86ISelLowering.cpp
  test/CodeGen/X86/dynamic-alloca-in-entry.ll
  test/CodeGen/X86/inalloca-ctor.ll
  test/CodeGen/X86/inalloca-invoke.ll
  test/CodeGen/X86/inalloca-stdcall.ll
  test/CodeGen/X86/inalloca.ll
  test/CodeGen/X86/mem-intrin-base-reg.ll
  test/CodeGen/X86/mingw-alloca.ll
  test/CodeGen/X86/movtopush.ll
  test/CodeGen/X86/pr17631.ll
  test/CodeGen/X86/stack-probe-size.ll
  test/CodeGen/X86/stack-probes.ll
  test/CodeGen/X86/win64_alloca_dynalloca.ll
  test/CodeGen/X86/win64_eh.ll
  test/CodeGen/X86/win64_frame.ll
  test/CodeGen/X86/win_chkstk.ll
  test/CodeGen/X86/windows-itanium-alloca.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D12483.33544.patch
Type: text/x-patch
Size: 47321 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150830/e278ce98/attachment.bin>


More information about the llvm-commits mailing list