[PATCH] D140123: [TLS] Clamp the alignment of TLS global variables if required by the target
Wolfgang Pieb via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Dec 15 17:41:39 PST 2022
wolfgangp added inline comments.
================
Comment at: llvm/lib/Transforms/Utils/Local.cpp:1425-1426
+ if (GO->isThreadLocal() && DL.exceedsMaxTLSAlign(PrefAlign))
+ PrefAlign = Align(DL.getMaxTLSAlign());
+
----------------
arsenm wrote:
> Why wouldn't this be in GlobalObject::canIncreaseAlignment?
> Why wouldn't this be in GlobalObject::canIncreaseAlignment?
The way I read it, canIncreaseAlignment() just answers the question whether the alignment of the object can be increased at all. It should be possible to increase the alignment of the TLS variable, just not beyond the max value.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D140123/new/
https://reviews.llvm.org/D140123
More information about the llvm-commits
mailing list