[PATCH] D145224: [LLVM][OHOS] Use emulated TLS for OHOS platform

Pavel Kosov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Apr 17 07:36:39 PDT 2023


This revision was automatically updated to reflect the committed changes.
Closed by commit rGc3ec3ed2a1f3: [LLVM][OHOS] Use emulated TLS for OHOS platform (authored by kpdev42).

Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D145224

Files:
  llvm/include/llvm/TargetParser/Triple.h
  llvm/test/CodeGen/X86/emutls-pic.ll


Index: llvm/test/CodeGen/X86/emutls-pic.ll
===================================================================
--- llvm/test/CodeGen/X86/emutls-pic.ll
+++ llvm/test/CodeGen/X86/emutls-pic.ll
@@ -7,6 +7,8 @@
 ; RUN: llc < %s -mtriple=x86_64-linux-gnu -relocation-model=pic | FileCheck -check-prefix=NoEMU %s
 ; RUN: llc < %s -mtriple=i386-linux-android -relocation-model=pic | FileCheck -check-prefix=X86 %s
 ; RUN: llc < %s -mtriple=x86_64-linux-android -relocation-model=pic | FileCheck -check-prefix=X64 %s
+; RUN: llc < %s -mtriple=i386-linux-ohos -relocation-model=pic | FileCheck -check-prefix=X86 %s
+; RUN: llc < %s -mtriple=x86_64-linux-ohos -relocation-model=pic | FileCheck -check-prefix=X64 %s
 
 ; NoEMU-NOT: __emutls
 
Index: llvm/include/llvm/TargetParser/Triple.h
===================================================================
--- llvm/include/llvm/TargetParser/Triple.h
+++ llvm/include/llvm/TargetParser/Triple.h
@@ -980,7 +980,8 @@
 
   /// Tests whether the target uses emulated TLS as default.
   bool hasDefaultEmulatedTLS() const {
-    return isAndroid() || isOSOpenBSD() || isWindowsCygwinEnvironment();
+    return isAndroid() || isOSOpenBSD() || isWindowsCygwinEnvironment() ||
+           isOHOSFamily();
   }
 
   /// Tests whether the target uses -data-sections as default.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D145224.514228.patch
Type: text/x-patch
Size: 1308 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230417/ae58e18b/attachment.bin>


More information about the llvm-commits mailing list