Use function attribute "stackrealign" to decide whether stack
authorAkira Hatanaka <ahatanaka@apple.com>
Fri, 11 Sep 2015 18:54:38 +0000 (18:54 +0000)
committerAkira Hatanaka <ahatanaka@apple.com>
Fri, 11 Sep 2015 18:54:38 +0000 (18:54 +0000)
commit8e2b613ef041e861891affc6434bf4bee846ebbe
treee46dd021bb91a4fa3580c2b25c48d04f494f3026
parentd917fe01ab1f4fb4f534571572359a83e618a98f
Use function attribute "stackrealign" to decide whether stack
realignment should be forced.

With this commit, we can now force stack realignment when doing LTO and
do so on a per-function basis. Also, add a new cl::opt option
"stackrealign" to CommandFlags.h which is used to force stack
realignment via llc's command line.

Out-of-tree projects currently using -force-align-stack to force stack
realignment should make changes to attach the attribute to the functions
in the IR.

Differential Revision: http://reviews.llvm.org/D11814

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@247450 91177308-0d34-0410-b5e6-96231b3b80d8
14 files changed:
include/llvm/CodeGen/CommandFlags.h
include/llvm/Target/TargetRegisterInfo.h
lib/CodeGen/TargetRegisterInfo.cpp
lib/Target/X86/X86FrameLowering.cpp
test/CodeGen/Generic/ForceStackAlign.ll
test/CodeGen/X86/dynamic-allocas-VLAs.ll
test/CodeGen/X86/force-align-stack-alloca.ll
test/CodeGen/X86/force-align-stack.ll
test/CodeGen/X86/inline-asm-sp-clobber-memcpy.ll
test/CodeGen/X86/movtopush.ll
test/CodeGen/X86/pr11468.ll
test/CodeGen/X86/stack-align-memcpy.ll
test/CodeGen/X86/unaligned-spill-folding.ll
test/CodeGen/X86/x86-64-baseptr.ll