X86: Allow the stack probe size to be configurable per function
authorDavid Majnemer <david.majnemer@gmail.com>
Wed, 7 Jan 2015 18:14:07 +0000 (18:14 +0000)
committerDavid Majnemer <david.majnemer@gmail.com>
Wed, 7 Jan 2015 18:14:07 +0000 (18:14 +0000)
commit60812c05e748e183becba2cfe945fb2621ea1c9f
tree13b1addb93f6878e57b1683a1c881fda8dc0b74c
parent87ce6100a78f5a3ce125249833f372fac45a3af4
X86: Allow the stack probe size to be configurable per function

LLVM emits stack probes on Windows targets to ensure that the stack is
correctly accessed.  However, the amount of stack allocated before
emitting such a probe is hardcoded to 4096.

It is desirable to have this be configurable so that a function might
opt-out of stack probes.  Our level of granularity is at the function
level instead of, say, the module level to permit proper generation of
code after LTO.

Patch by Andrew H!

N.B.  The inliner needs to be updated to properly consider what happens
after inlining a function with a specific stack-probe-size into another
function with a different stack-probe-size.

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