Support for emitting inline stack probes
authorAndy Ayers <andya@microsoft.com>
Tue, 10 Nov 2015 01:50:49 +0000 (01:50 +0000)
committerAndy Ayers <andya@microsoft.com>
Tue, 10 Nov 2015 01:50:49 +0000 (01:50 +0000)
commit1d8af518507f7049736e1ce196580e944da8e2a6
tree729b805304ee5d377e83ba10a28a70f450412ae7
parent8de644391a08cb711dc1c4741c9c6a6f816938fa
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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@252578 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/Target/TargetFrameLowering.h
lib/CodeGen/PrologEpilogInserter.cpp
lib/Target/X86/X86FrameLowering.cpp
lib/Target/X86/X86FrameLowering.h
lib/Target/X86/X86ISelLowering.cpp
test/CodeGen/X86/stack-probe-size.ll
test/CodeGen/X86/win_coreclr_chkstk.ll [new file with mode: 0644]