[stackprotector] Implement the sspstrong rules for stack layout.
authorJosh Magee <joshua_magee@playstation.sony.com>
Sat, 1 Feb 2014 01:36:16 +0000 (01:36 +0000)
committerJosh Magee <joshua_magee@playstation.sony.com>
Sat, 1 Feb 2014 01:36:16 +0000 (01:36 +0000)
commitcde5c26c465d9831546896aa5f2e81358ae05e6c
tree50f646096ce637650f1178a128b4058856823db7
parent8a24e835504105efdf6d882053d5da7b0e1dccd3
[stackprotector] Implement the sspstrong rules for stack layout.

This changes the PrologueEpilogInserter and LocalStackSlotAllocation passes to
follow the extended stack layout rules for sspstrong and sspreq.

The sspstrong layout rules are:
 1. Large arrays and structures containing large arrays (>= ssp-buffer-size)
are closest to the stack protector.
 2. Small arrays and structures containing small arrays (< ssp-buffer-size) are
2nd closest to the protector.
 3. Variables that have had their address taken are 3rd closest to the
protector.

Differential Revision: http://llvm-reviews.chandlerc.com/D2546

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@200601 91177308-0d34-0410-b5e6-96231b3b80d8
docs/LangRef.rst
lib/CodeGen/LocalStackSlotAllocation.cpp
lib/CodeGen/PrologEpilogInserter.cpp
test/CodeGen/ARM/ssp-data-layout.ll
test/CodeGen/X86/ssp-data-layout.ll