[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
Mon Jan 9 18:05:39 PST 2023


wolfgangp updated this revision to Diff 487628.
wolfgangp added a comment.
Herald added a subscriber: StephenFan.

Instead of using the data layout string, we're using a module flag instead to describe the maximum alignment of a TLS variable. This works for LTO as well. As a test case, we're using the instcombine pass to demonstrate that we don't align beyond the maximum.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D140123/new/

https://reviews.llvm.org/D140123

Files:
  clang/lib/CodeGen/CodeGenModule.cpp
  clang/test/CodeGen/tls-maxalign-modflag.c
  llvm/include/llvm/IR/Module.h
  llvm/lib/IR/Module.cpp
  llvm/lib/Transforms/Utils/Local.cpp
  llvm/test/CodeGen/X86/tls-align.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D140123.487628.patch
Type: text/x-patch
Size: 3971 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230110/e243e5e9/attachment.bin>


More information about the llvm-commits mailing list