forked from OSchip/llvm-project
fa80642205
This patch adds a new common code feature that allows platform code to request minimum alignment of global symbols. The background for this is that on SystemZ, the most efficient way to load addresses of global symbol is the LOAD ADDRESS RELATIVE LONG (LARL) instruction. This instruction provides PC-relative addressing, but only to *even* addresses. For this reason, existing compilers will guarantee that global symbols are always aligned to at least 2. [ Since symbols would otherwise already use a default alignment based on their type, this will usually only affect global objects of character type or character arrays. ] GCC also allows creating symbols without that extra alignment by using explicit "aligned" attributes (which then need to be used on both definition and each use of the symbol). To enable support for this with Clang, this patch adds a TargetInfo::MinGlobalAlign variable that provides a global minimum for the alignment of every global object (unless overridden via explicit alignment attribute), and adds code to respect this setting. Within this patch, no platform actually sets the value to anything but the default 1, resulting in no change in behaviour on any existing target. This version of the patch incorporates feedback from reviews by Eric Christopher and John McCall. Thanks to all reviewers! Patch by Richard Sandiford. llvm-svn: 181210 |
||
---|---|---|
.. | ||
Builtins.cpp | ||
CMakeLists.txt | ||
CharInfo.cpp | ||
Diagnostic.cpp | ||
DiagnosticIDs.cpp | ||
FileManager.cpp | ||
FileSystemStatCache.cpp | ||
IdentifierTable.cpp | ||
LangOptions.cpp | ||
Makefile | ||
Module.cpp | ||
ObjCRuntime.cpp | ||
OpenMPKinds.cpp | ||
OperatorPrecedence.cpp | ||
SourceLocation.cpp | ||
SourceManager.cpp | ||
TargetInfo.cpp | ||
Targets.cpp | ||
TokenKinds.cpp | ||
Version.cpp | ||
VersionTuple.cpp |