diff options
author | Chad Rosier <mcrosier@apple.com> | 2012-07-13 23:57:43 +0000 |
---|---|---|
committer | Chad Rosier <mcrosier@apple.com> | 2012-07-13 23:57:43 +0000 |
commit | f9e9af7df0cea6e997ac04131c7af6ca4384b0cc (patch) | |
tree | e465c3d01b6954e3ae02b85003f2e1135a0fd47e /include/clang/Basic/TargetInfo.h | |
parent | 558e8872b364b43ab9f201dd6b2df9a5b74b0542 (diff) |
Add a per target max vector alignment field (e.g., 32-byte alignment for x86 due to
AVX). Currently, if no aligned attribute is specified the alignment of a vector is
inferred from its size. Thus, very large vectors will be over-aligned with no
benefit. Target owners should set this target max.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160209 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/clang/Basic/TargetInfo.h')
-rw-r--r-- | include/clang/Basic/TargetInfo.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/include/clang/Basic/TargetInfo.h b/include/clang/Basic/TargetInfo.h index 125496a360..54d49e6fa5 100644 --- a/include/clang/Basic/TargetInfo.h +++ b/include/clang/Basic/TargetInfo.h @@ -80,6 +80,7 @@ protected: unsigned char LongLongWidth, LongLongAlign; unsigned char SuitableAlign; unsigned char MaxAtomicPromoteWidth, MaxAtomicInlineWidth; + unsigned short MaxVectorAlign; const char *DescriptionString; const char *UserLabelPrefix; const char *MCountName; @@ -308,6 +309,9 @@ public: /// inlined given the supported features of the given target. unsigned getMaxAtomicInlineWidth() const { return MaxAtomicInlineWidth; } + /// \brief Return the maximum vector alignment supported for the given target. + unsigned getMaxVectorAlign() const { return MaxVectorAlign; } + /// \brief Return the size of intmax_t and uintmax_t for this target, in bits. unsigned getIntMaxTWidth() const { return getTypeWidth(IntMaxType); |