summaryrefslogtreecommitdiffstats
path: root/clang/lib/Basic/Targets.cpp
diff options
context:
space:
mode:
authorChad Rosier <mcrosier@apple.com>2012-07-13 23:57:43 +0000
committerChad Rosier <mcrosier@apple.com>2012-07-13 23:57:43 +0000
commitcc40ea7f9a26192b9a377569e2798c635765f53c (patch)
treedfd3c50e13e8e20905728fd5f40270597da72bf7 /clang/lib/Basic/Targets.cpp
parent1c5431af8138b6c1b847eae76aae66e60fa31e52 (diff)
downloadbcm5719-llvm-cc40ea7f9a26192b9a377569e2798c635765f53c.tar.gz
bcm5719-llvm-cc40ea7f9a26192b9a377569e2798c635765f53c.zip
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. llvm-svn: 160209
Diffstat (limited to 'clang/lib/Basic/Targets.cpp')
-rw-r--r--clang/lib/Basic/Targets.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/clang/lib/Basic/Targets.cpp b/clang/lib/Basic/Targets.cpp
index 3df59c35d12..193241361da 100644
--- a/clang/lib/Basic/Targets.cpp
+++ b/clang/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
OpenPOWER on IntegriCloud