[PATCH] D106671: [RFC][WIP] Add an llvmlibc Triple environment

Guillaume Chatelet via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jul 23 08:07:29 PDT 2021


gchatelet created this revision.
gchatelet added a reviewer: sivachandra.
Herald added subscribers: dexonsmith, hiraditya.
gchatelet requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

It's probably too early but I'd like to get the conversation started around the integration of llvm-libc in LLVM.
For instance, the avaibility of `bzero` and `bcmp` can lead to simplification of libcalls (e.g. `memset(pr, 0, size)` or `memcmp(lhs, rhs, size)==0`).


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D106671

Files:
  llvm/include/llvm/ADT/Triple.h
  llvm/lib/Support/Triple.cpp


Index: llvm/lib/Support/Triple.cpp
===================================================================
--- llvm/lib/Support/Triple.cpp
+++ llvm/lib/Support/Triple.cpp
@@ -242,11 +242,15 @@
   case GNUABIN32: return "gnuabin32";
   case GNUEABI: return "gnueabi";
   case GNUEABIHF: return "gnueabihf";
-  case GNUX32: return "gnux32";
   case GNUILP32: return "gnu_ilp32";
+  case GNUX32:
+    return "gnux32";
   case Itanium: return "itanium";
-  case MSVC: return "msvc";
+  case LLVMLibc:
+    return "llvmlibc";
   case MacABI: return "macabi";
+  case MSVC:
+    return "msvc";
   case Musl: return "musl";
   case MuslEABI: return "musleabi";
   case MuslEABIHF: return "musleabihf";
Index: llvm/include/llvm/ADT/Triple.h
===================================================================
--- llvm/include/llvm/ADT/Triple.h
+++ llvm/include/llvm/ADT/Triple.h
@@ -204,29 +204,29 @@
   enum EnvironmentType {
     UnknownEnvironment,
 
+    Android,
+    CODE16,
+    CoreCLR,
+    Cygnus,
+    EABI,
+    EABIHF,
     GNU,
-    GNUABIN32,
     GNUABI64,
+    GNUABIN32,
     GNUEABI,
     GNUEABIHF,
-    GNUX32,
     GNUILP32,
-    CODE16,
-    EABI,
-    EABIHF,
-    Android,
+    GNUX32,
+    Itanium,
+    LLVMLibc,
+    MacABI, // Mac Catalyst variant of Apple's iOS deployment target.
+    MSVC,
     Musl,
     MuslEABI,
     MuslEABIHF,
     MuslX32,
-
-    MSVC,
-    Itanium,
-    Cygnus,
-    CoreCLR,
     Simulator, // Simulator variants of other systems, e.g., Apple's iOS
-    MacABI, // Mac Catalyst variant of Apple's iOS deployment target.
-    LastEnvironmentType = MacABI
+    LastEnvironmentType = Simulator
   };
   enum ObjectFormatType {
     UnknownObjectFormat,


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D106671.361217.patch
Type: text/x-patch
Size: 1696 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210723/43d7a138/attachment.bin>


More information about the llvm-commits mailing list