[TLS]: Clamp the alignment of TLS global variables if required by the target
authorWolfgang Pieb <wolfgang_pieb@playstation.sony.com>
Mon, 6 Feb 2023 21:50:37 +0000 (13:50 -0800)
committerWolfgang Pieb <wolfgang_pieb@playstation.sony.com>
Wed, 8 Feb 2023 18:34:56 +0000 (10:34 -0800)
commit5d07e0448e38d4be0cc7b1079d72b5e3644e941c
treef98ec36c2a5f4df3a9ee87516335f8a72f206769
parent66b8d2bb71298cf3f406593464c6d729b7817f51
[TLS]: Clamp the alignment of TLS global variables if required by the target

Adding a module flag 'MaxTLSAlign' describing the maximum alignment a global TLS
variable can have. Optimizers are prevented from increasing the alignment of such
variables beyond this threshold.

Reviewed By: probinson

Differential Revision: https://reviews.llvm.org/D140123
clang/lib/CodeGen/CodeGenModule.cpp
clang/test/CodeGen/tls-maxalign-modflag.c [new file with mode: 0644]
llvm/include/llvm/IR/Module.h
llvm/lib/IR/Module.cpp
llvm/lib/Transforms/Utils/Local.cpp
llvm/test/CodeGen/X86/tls-align.ll [new file with mode: 0644]