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 /lib/Basic/Targets.cpp | |
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 'lib/Basic/Targets.cpp')
-rw-r--r-- | lib/Basic/Targets.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/Basic/Targets.cpp b/lib/Basic/Targets.cpp index 3df59c35d1..193241361d 100644 --- a/lib/Basic/Targets.cpp +++ b/lib/Basic/Targets.cpp @@ -2448,6 +2448,7 @@ public: LongDoubleWidth = 128; LongDoubleAlign = 128; SuitableAlign = 128; + MaxVectorAlign = 256; SizeType = UnsignedLong; IntPtrType = SignedLong; DescriptionString = "e-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-" @@ -2755,6 +2756,7 @@ public: DarwinX86_64TargetInfo(const std::string& triple) : DarwinTargetInfo<X86_64TargetInfo>(triple) { Int64Type = SignedLongLong; + MaxVectorAlign = 256; } }; } // end anonymous namespace |