[PATCH] D130245: [XCOFF] disable location attribute generation for TLS variable

ChenZheng via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 21 03:45:43 PDT 2022


shchenz created this revision.
shchenz added reviewers: Esme, qiucf, PowerPC.
Herald added subscribers: hiraditya, nemanjai.
Herald added a project: All.
shchenz requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

TLS debug on AIX is not ready for now.
The location generated in no-integrated-as mode is wrong and in integrated-as mode causes AIX linker error.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D130245

Files:
  llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp
  llvm/test/CodeGen/PowerPC/tls-debug-aix.ll


Index: llvm/test/CodeGen/PowerPC/tls-debug-aix.ll
===================================================================
--- llvm/test/CodeGen/PowerPC/tls-debug-aix.ll
+++ llvm/test/CodeGen/PowerPC/tls-debug-aix.ll
@@ -8,8 +8,8 @@
 ; ASM:         .dwsect 0x10000
 ; ASM-NEXT:    .dwinfo:
 ; ASM:         .byte{{.*}}DW_TAG_variable
-; ASM:         .byte{{.*}}DW_AT_location
-; ASM:         .vbyte{{.*}}i[TL]
+; ASM-NOT:     .byte{{.*}}DW_AT_location
+; ASM-NOT:     .vbyte{{.*}}i[TL]
 ; ASM:         .byte{{.*}}DW_TAG_
 
 ; OBJ:        DW_TAG_variable
@@ -18,7 +18,7 @@
 ; OBJ-NEXT:     DW_AT_external
 ; OBJ-NEXT:     DW_AT_decl_file
 ; OBJ-NEXT:     DW_AT_decl_line
-; OBJ-NEXT:     DW_AT_location{{.*}}DW_OP_form_tls_address
+; OBJ-NOT:      DW_AT_location{{.*}}DW_OP_form_tls_address
 ; OBJ:        DW_TAG_
 
 @i = thread_local global i32 20, align 4, !dbg !0
Index: llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp
===================================================================
--- llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp
+++ llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp
@@ -2469,6 +2469,12 @@
   PersonalityEncoding = 0;
   LSDAEncoding = 0;
   CallSiteEncoding = dwarf::DW_EH_PE_udata4;
+
+  // AIX debug for thread local location is not ready. And for integrated as
+  // mode, the relocatable address for the thread local variable will cause
+  // linker error. So disable the location attribute generation for thread local
+  // variables for now.
+  SupportDebugThreadLocalLocation = false;
 }
 
 MCSection *TargetLoweringObjectFileXCOFF::getStaticCtorSection(


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D130245.446419.patch
Type: text/x-patch
Size: 1589 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220721/121feb1a/attachment.bin>


More information about the llvm-commits mailing list