diff options
author | Andy Ayers <andya@microsoft.com> | 2015-11-10 01:50:49 +0000 |
---|---|---|
committer | Andy Ayers <andya@microsoft.com> | 2015-11-10 01:50:49 +0000 |
commit | 809cbe9ea03325c268855fd0f0da308227fbf43b (patch) | |
tree | 267e26f60a017033a6d641b7d0c22024bd5124ac /llvm/lib/CodeGen/PrologEpilogInserter.cpp | |
parent | 88ae650d6ac3dedd20d29df061bb22fa69f8588d (diff) | |
download | bcm5719-llvm-809cbe9ea03325c268855fd0f0da308227fbf43b.tar.gz bcm5719-llvm-809cbe9ea03325c268855fd0f0da308227fbf43b.zip |
Support for emitting inline stack probes
For CoreCLR on Windows, stack probes must be emitted as inline sequences that probe successive stack pages
between the current stack limit and the desired new stack pointer location. This implements support for
the inline expansion on x64.
For in-body alloca probes, expansion is done during instruction lowering. For prolog probes, a stub call
is initially emitted during prolog creation, and expanded after epilog generation, to avoid complications
that arise when introducing new machine basic blocks during prolog and epilog creation.
Added a new test case, modified an existing one to exclude non-x64 coreclr (for now).
Add test case
Fix tests
llvm-svn: 252578
Diffstat (limited to 'llvm/lib/CodeGen/PrologEpilogInserter.cpp')
-rw-r--r-- | llvm/lib/CodeGen/PrologEpilogInserter.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/PrologEpilogInserter.cpp b/llvm/lib/CodeGen/PrologEpilogInserter.cpp index 13e753692de..939c50027b0 100644 --- a/llvm/lib/CodeGen/PrologEpilogInserter.cpp +++ b/llvm/lib/CodeGen/PrologEpilogInserter.cpp @@ -781,6 +781,9 @@ void PEI::insertPrologEpilogCode(MachineFunction &Fn) { for (MachineBasicBlock *RestoreBlock : RestoreBlocks) TFI.emitEpilogue(Fn, *RestoreBlock); + for (MachineBasicBlock *SaveBlock : SaveBlocks) + TFI.inlineStackProbe(Fn, *SaveBlock); + // Emit additional code that is required to support segmented stacks, if // we've been asked for it. This, when linked with a runtime with support // for segmented stacks (libgcc is one), will result in allocating stack |