aboutsummaryrefslogtreecommitdiffstats
path: root/docs
diff options
context:
space:
mode:
authorLang Hames <lhames@gmail.com>2011-10-10 23:42:08 +0000
committerLang Hames <lhames@gmail.com>2011-10-10 23:42:08 +0000
commitbb5b3f33594cfa40e9f53bf9a71af359b080a697 (patch)
tree6b21d9566d315610c50baf3e3492c84d1de5b16f /docs
parent15565ad758ae28f21a1f8bbcc92fac49482bd820 (diff)
downloadexternal_llvm-bb5b3f33594cfa40e9f53bf9a71af359b080a697.zip
external_llvm-bb5b3f33594cfa40e9f53bf9a71af359b080a697.tar.gz
external_llvm-bb5b3f33594cfa40e9f53bf9a71af359b080a697.tar.bz2
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
Diffstat (limited to 'docs')
-rw-r--r--docs/LangRef.html6
1 files changed, 6 insertions, 0 deletions
diff --git a/docs/LangRef.html b/docs/LangRef.html
index 1392db6..a28d92e 100644
--- a/docs/LangRef.html
+++ b/docs/LangRef.html
@@ -1319,6 +1319,12 @@ target datalayout = "<i>layout specification</i>"
the bits with the least significance have the lowest address
location.</dd>
+ <dt><tt>S<i>size</i></tt></dt>
+ <dd>Specifies the natural alignment of the stack in bits. Alignment promotion
+ of stack variables is limited to the natural stack alignment to avoid
+ dynamic stack realignment. The stack alignment must be a multiple of
+ 8-bits, and currently defaults to 128 bits if unspecified.</dd>
+
<dt><tt>p:<i>size</i>:<i>abi</i>:<i>pref</i></tt></dt>
<dd>This specifies the <i>size</i> of a pointer and its <i>abi</i> and
<i>preferred</i> alignments. All sizes are in bits. Specifying