[flang-commits] [clang] [flang] [mlir] [CIR][MLIR-LLVM] Add 'thread local mode/model' attribute support (PR #214337)
Erich Keane via flang-commits
flang-commits at lists.llvm.org
Thu Aug 6 05:56:10 PDT 2026
================
@@ -2420,8 +2421,15 @@ static void printCommonGlobalAndAlias(OpAsmPrinter &p, OpType op) {
StringRef visibility = stringifyVisibility(op.getVisibility_());
if (!visibility.empty())
p << visibility << ' ';
- if (op.getThreadLocal_())
- p << "thread_local ";
+
+ if (ThreadLocalMode mode = op.getTlsMode();
+ mode != ThreadLocalMode::NotThreadLocal) {
+ p << "thread_local";
+ if (mode != ThreadLocalMode::GeneralDynamic)
----------------
erichkeane wrote:
Nope! In fact, the test impact for this is fairly minor. I chose to not print it for GeneralDynamic to match the print behavior of LLVM (Which skips it in the general-dynamic mode). I can definitely/easily make the change if you'd like.
https://github.com/llvm/llvm-project/pull/214337
More information about the flang-commits
mailing list