OSDN Git Service

Add a natural stack alignment field to TargetData, and prevent InstCombine from
authorLang Hames <lhames@gmail.com>
Mon, 10 Oct 2011 23:42:08 +0000 (23:42 +0000)
committerLang Hames <lhames@gmail.com>
Mon, 10 Oct 2011 23:42:08 +0000 (23:42 +0000)
commitbb5b3f33594cfa40e9f53bf9a71af359b080a697
tree6b21d9566d315610c50baf3e3492c84d1de5b16f
parent15565ad758ae28f21a1f8bbcc92fac49482bd820
Add a natural stack alignment field to TargetData, and prevent InstCombine from
promoting allocas to preferred alignments that exceed the natural
alignment. This avoids some potentially expensive dynamic stack realignments.

The natural stack alignment is set in target data strings via the "S<size>"
option. Size is in bits and must be a multiple of 8. The natural stack alignment
defaults to "unspecified" (represented by a zero value), and the "unspecified"
value does not prevent any alignment promotions. Target maintainers that care
about avoiding promotions should explicitly add the "S<size>" option to their
target data strings.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@141599 91177308-0d34-0410-b5e6-96231b3b80d8
docs/LangRef.html
include/llvm/Target/TargetData.h
lib/Target/ARM/ARMTargetMachine.cpp
lib/Target/TargetData.cpp
lib/Target/X86/README-SSE.txt
lib/Target/X86/README.txt
lib/Target/X86/X86TargetMachine.cpp
lib/Transforms/Utils/Local.cpp