[libc-commits] [libc] [libc][newhdrgen] sorting yaml_functions (PR #102537)

via libc-commits libc-commits at lists.llvm.org
Thu Aug 8 14:00:48 PDT 2024


llvmbot wrote:


<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-libc

Author: None (aaryanshukla)

<details>
<summary>Changes</summary>



---

Patch is 138.04 KiB, truncated to 20.00 KiB below, full version: https://github.com/llvm/llvm-project/pull/102537.diff


23 Files Affected:

- (modified) libc/newhdrgen/yaml/ctype.yaml (+12-12) 
- (modified) libc/newhdrgen/yaml/fcntl.yaml (+3-3) 
- (modified) libc/newhdrgen/yaml/fenv.yaml (+30-30) 
- (modified) libc/newhdrgen/yaml/gpu/rpc.yaml (+7-7) 
- (modified) libc/newhdrgen/yaml/math.yaml (+1161-1161) 
- (modified) libc/newhdrgen/yaml/pthread.yaml (+89-89) 
- (modified) libc/newhdrgen/yaml/sched.yaml (+7-7) 
- (modified) libc/newhdrgen/yaml/search.yaml (+10-10) 
- (modified) libc/newhdrgen/yaml/signal.yaml (+20-20) 
- (modified) libc/newhdrgen/yaml/stdbit.yaml (+115-115) 
- (modified) libc/newhdrgen/yaml/stdfix.yaml (+34-34) 
- (modified) libc/newhdrgen/yaml/stdio.yaml (+146-146) 
- (modified) libc/newhdrgen/yaml/stdlib.yaml (+77-77) 
- (modified) libc/newhdrgen/yaml/string.yaml (+126-126) 
- (modified) libc/newhdrgen/yaml/strings.yaml (+20-20) 
- (modified) libc/newhdrgen/yaml/sys/epoll.yaml (+6-6) 
- (modified) libc/newhdrgen/yaml/sys/mman.yaml (+27-27) 
- (modified) libc/newhdrgen/yaml/sys/socket.yaml (+6-6) 
- (modified) libc/newhdrgen/yaml/sys/statvfs.yaml (+6-6) 
- (modified) libc/newhdrgen/yaml/termios.yaml (+10-10) 
- (modified) libc/newhdrgen/yaml/threads.yaml (+16-16) 
- (modified) libc/newhdrgen/yaml/time.yaml (+6-6) 
- (modified) libc/newhdrgen/yaml/unistd.yaml (+53-53) 


``````````diff
diff --git a/libc/newhdrgen/yaml/ctype.yaml b/libc/newhdrgen/yaml/ctype.yaml
index e5b4d11422d98d..f3108a34d43377 100644
--- a/libc/newhdrgen/yaml/ctype.yaml
+++ b/libc/newhdrgen/yaml/ctype.yaml
@@ -16,6 +16,12 @@ functions:
     return_type: int
     arguments:
       - type: int
+  - name: isascii
+    standards:
+      - POSIX
+    return_type: int
+    arguments:
+      - type: int
   - name: isblank
     standards:
       - stdc
@@ -76,28 +82,22 @@ functions:
     return_type: int
     arguments:
       - type: int
-  - name: tolower
+  - name: toascii
     standards:
-      - stdc
+      - GNUExtensions
     return_type: int
     arguments:
       - type: int
-  - name: toupper
+  - name: tolower
     standards:
       - stdc
     return_type: int
     arguments:
       - type: int
-    functions:
-  - name: isascii
-    standards:
-      - POSIX
-    return_type: int
-    arguments:
-      - type: int
-  - name: toascii
+  - name: toupper
     standards:
-      - GNUExtensions
+      - stdc
     return_type: int
     arguments:
       - type: int
+    functions: null
diff --git a/libc/newhdrgen/yaml/fcntl.yaml b/libc/newhdrgen/yaml/fcntl.yaml
index a7bd1997b0eac8..71c0df3b0fadaa 100644
--- a/libc/newhdrgen/yaml/fcntl.yaml
+++ b/libc/newhdrgen/yaml/fcntl.yaml
@@ -20,7 +20,7 @@ functions:
     arguments:
       - type: int
       - type: int
-      - type: ...
+      - type: '...'
   - name: open
     standards:
       - POSIX
@@ -28,7 +28,7 @@ functions:
     arguments:
       - type: const char *
       - type: int
-      - type: ...
+      - type: '...'
   - name: openat
     standards:
       - POSIX
@@ -37,4 +37,4 @@ functions:
       - type: int
       - type: const char *
       - type: int
-      - type: ...
+      - type: '...'
diff --git a/libc/newhdrgen/yaml/fenv.yaml b/libc/newhdrgen/yaml/fenv.yaml
index 95eb93c883e3c8..1010efc6402c1b 100644
--- a/libc/newhdrgen/yaml/fenv.yaml
+++ b/libc/newhdrgen/yaml/fenv.yaml
@@ -12,55 +12,61 @@ functions:
     return_type: int
     arguments:
       - type: int
-  - name: fetestexcept
+  - name: fedisableexcept
     standards:
-      - stdc
+      - GNUExtensions
     return_type: int
     arguments:
       - type: int
-  - name: fetestexceptflag
+    guard: null
+  - name: feenableexcept
     standards:
-      - stdc
+      - GNUExtensions
     return_type: int
     arguments:
-      - type: const fexcept_t *
       - type: int
-  - name: feraiseexcept
+    attributes: []
+  - name: fegetenv
     standards:
       - stdc
     return_type: int
     arguments:
-      - type: int
-  - name: fesetround
+      - type: fenv_t *
+  - name: fegetexcept
+    standards:
+      - GNUExtensions
+    return_type: int
+    arguments: []
+  - name: fegetexceptflag
     standards:
       - stdc
     return_type: int
     arguments:
+      - type: fexcept_t *
       - type: int
   - name: fegetround
     standards:
       - stdc
     return_type: int
     arguments: []
-  - name: fegetenv
+  - name: feholdexcept
     standards:
       - stdc
     return_type: int
     arguments:
       - type: fenv_t *
-  - name: fesetenv
+  - name: feraiseexcept
     standards:
       - stdc
     return_type: int
     arguments:
-      - type: const fenv_t *
-  - name: fegetexceptflag
+      - type: int
+  - name: fesetenv
     standards:
       - stdc
     return_type: int
     arguments:
-      - type: fexcept_t *
-      - type: int
+      - type: const fenv_t *
   - name: fesetexcept
     standards:
       - stdc
@@ -74,34 +80,28 @@ functions:
     arguments:
       - type: const fexcept_t *
       - type: int
-  - name: feholdexcept
+  - name: fesetround
     standards:
       - stdc
     return_type: int
     arguments:
-      - type: fenv_t *
-  - name: feupdateenv
+      - type: int
+  - name: fetestexcept
     standards:
       - stdc
     return_type: int
-    arguments:
-      - type: const fenv_t *
-  - name: fedisableexcept
-    standards:
-      - GNUExtensions
-    return_type: int
     arguments:
       - type: int
-    guard: null
-  - name: feenableexcept
+  - name: fetestexceptflag
     standards:
-      - GNUExtensions
+      - stdc
     return_type: int
     arguments:
+      - type: const fexcept_t *
       - type: int
-    attributes: []
-  - name: fegetexcept
+  - name: feupdateenv
     standards:
-      - GNUExtensions
+      - stdc
     return_type: int
-    arguments: []
+    arguments:
+      - type: const fenv_t *
diff --git a/libc/newhdrgen/yaml/gpu/rpc.yaml b/libc/newhdrgen/yaml/gpu/rpc.yaml
index 57473f72c38271..61856bc0c7d692 100644
--- a/libc/newhdrgen/yaml/gpu/rpc.yaml
+++ b/libc/newhdrgen/yaml/gpu/rpc.yaml
@@ -4,20 +4,20 @@ types: []
 enums: []
 objects: []
 functions:
-  - name: rpc_host_call
+  - name: rpc_fprintf
     standards:
       - GPUExtensions
-    return_type: void
+    return_type: int
     arguments:
-      - type: void *
+      - type: ::FILE *__restrict
+      - type: const char *__restrict
       - type: void *
       - type: size_t
-  - name: rpc_fprintf
+  - name: rpc_host_call
     standards:
       - GPUExtensions
-    return_type: int
+    return_type: void
     arguments:
-      - type: ::FILE *__restrict
-      - type: const char *__restrict
+      - type: void *
       - type: void *
       - type: size_t
diff --git a/libc/newhdrgen/yaml/math.yaml b/libc/newhdrgen/yaml/math.yaml
index d22546e50b3feb..d2b9af9acbd73f 100644
--- a/libc/newhdrgen/yaml/math.yaml
+++ b/libc/newhdrgen/yaml/math.yaml
@@ -7,794 +7,866 @@ types:
 enums: []
 objects: []
 functions:
-  - name: cbrt
+  - name: acosf
     standards:
       - stdc
-    return_type: double
+    return_type: float
     arguments:
-      - type: double
-  - name: cbrtf
+      - type: float
+  - name: acoshf
     standards:
       - stdc
     return_type: float
     arguments:
       - type: float
-  - name: copysign
+  - name: asin
     standards:
       - stdc
     return_type: double
     arguments:
       - type: double
-      - type: double
-  - name: copysignf
+  - name: asinf
     standards:
       - stdc
     return_type: float
     arguments:
       - type: float
-      - type: float
-  - name: copysignl
+  - name: asinhf
     standards:
       - stdc
-    return_type: long double
+    return_type: float
     arguments:
-      - type: long double
-      - type: long double
-  - name: ceil
+      - type: float
+  - name: atan2f
     standards:
       - stdc
-    return_type: double
+    return_type: float
     arguments:
-      - type: double
-  - name: ceilf
+      - type: float
+      - type: float
+  - name: atanf
     standards:
       - stdc
     return_type: float
     arguments:
       - type: float
-  - name: ceill
+  - name: atanhf
     standards:
       - stdc
-    return_type: long double
+    return_type: float
     arguments:
-      - type: long double
-  - name: fabs
+      - type: float
+  - name: canonicalize
     standards:
       - stdc
-    return_type: double
+    return_type: int
     arguments:
       - type: double
-  - name: fabsf
+      - type: double
+  - name: canonicalizef
     standards:
       - stdc
-    return_type: float
+    return_type: int
     arguments:
       - type: float
-  - name: fabsl
-    standards:
-      - stdc
-    return_type: long double
-    arguments:
-      - type: long double
-  - name: fdim
+      - type: float
+  - name: canonicalizef128
     standards:
       - stdc
-    return_type: double
+    return_type: int
     arguments:
-      - type: double
-      - type: double
-  - name: fdimf
+      - type: float128
+      - type: float128
+    guard: LIBC_TYPES_HAS_FLOAT128
+  - name: canonicalizef16
     standards:
       - stdc
-    return_type: float
+    return_type: int
     arguments:
-      - type: float
-      - type: float
-  - name: fdiml
+      - type: _Float16
+      - type: _Float16
+    guard: LIBC_TYPES_HAS_FLOAT16
+  - name: canonicalizel
     standards:
       - stdc
-    return_type: long double
+    return_type: int
     arguments:
       - type: long double
       - type: long double
-  - name: floor
+  - name: cbrt
     standards:
       - stdc
     return_type: double
     arguments:
       - type: double
-  - name: floorf
+  - name: cbrtf
     standards:
       - stdc
     return_type: float
     arguments:
       - type: float
-  - name: floorl
-    standards:
-      - stdc
-    return_type: long double
-    arguments:
-      - type: long double
-  - name: fmin
+  - name: ceil
     standards:
       - stdc
     return_type: double
     arguments:
       - type: double
-      - type: double
-  - name: fminf
+  - name: ceilf
     standards:
       - stdc
     return_type: float
     arguments:
       - type: float
-      - type: float
-  - name: fminl
-    standards:
-      - stdc
-    return_type: long double
-    arguments:
-      - type: long double
-      - type: long double
-  - name: fmax
+  - name: ceilf128
     standards:
       - stdc
-    return_type: double
+    return_type: float128
     arguments:
-      - type: double
-      - type: double
-  - name: fmaxf
+      - type: float128
+    guard: LIBC_TYPES_HAS_FLOAT128
+  - name: ceilf16
     standards:
       - stdc
-    return_type: float
+    return_type: _Float16
     arguments:
-      - type: float
-      - type: float
-  - name: fmaxl
+      - type: _Float16
+    guard: LIBC_TYPES_HAS_FLOAT16
+  - name: ceill
     standards:
       - stdc
     return_type: long double
     arguments:
       - type: long double
-      - type: long double
-  - name: fmaximum
+  - name: copysign
     standards:
       - stdc
     return_type: double
     arguments:
       - type: double
       - type: double
-  - name: fmaximumf
+  - name: copysignf
     standards:
       - stdc
     return_type: float
     arguments:
       - type: float
       - type: float
-  - name: fmaximuml
+  - name: copysignf128
+    standards:
+      - stdc
+    return_type: float128
+    arguments:
+      - type: float128
+      - type: float128
+    guard: LIBC_TYPES_HAS_FLOAT128
+  - name: copysignf16
+    standards:
+      - stdc
+    return_type: _Float16
+    arguments:
+      - type: _Float16
+      - type: _Float16
+    guard: LIBC_TYPES_HAS_FLOAT16
+  - name: copysignl
     standards:
       - stdc
     return_type: long double
     arguments:
       - type: long double
       - type: long double
-  - name: fmaximum_num
+  - name: cos
     standards:
       - stdc
     return_type: double
     arguments:
       - type: double
-      - type: double
-  - name: fmaximum_numf
+  - name: cosf
     standards:
       - stdc
     return_type: float
     arguments:
       - type: float
-      - type: float
-  - name: fmaximum_numl
+  - name: coshf
     standards:
       - stdc
-    return_type: long double
+    return_type: float
     arguments:
-      - type: long double
-      - type: long double
-  - name: fmaximum_mag
+      - type: float
+  - name: dmulf128
+    standards:
+      - llvm_libc_ext
+    return_type: double
+    arguments:
+      - type: float128
+      - type: float128
+    guard: LIBC_TYPES_HAS_FLOAT128
+  - name: dmull
     standards:
       - stdc
     return_type: double
     arguments:
-      - type: double
-      - type: double
-  - name: fmaximum_magf
+      - type: long double
+      - type: long double
+  - name: erff
     standards:
       - stdc
     return_type: float
     arguments:
       - type: float
-      - type: float
-  - name: fmaximum_magl
+  - name: exp
     standards:
       - stdc
-    return_type: long double
+    return_type: double
     arguments:
-      - type: long double
-      - type: long double
-  - name: fmaximum_mag_num
+      - type: double
+  - name: exp10
     standards:
       - stdc
     return_type: double
     arguments:
       - type: double
-      - type: double
-  - name: fmaximum_mag_numf
+  - name: exp10f
     standards:
       - stdc
     return_type: float
     arguments:
       - type: float
-      - type: float
-  - name: fmaximum_mag_numl
-    standards:
-      - stdc
-    return_type: long double
-    arguments:
-      - type: long double
-      - type: long double
-  - name: fminimum
+  - name: exp2
     standards:
       - stdc
     return_type: double
     arguments:
       - type: double
-      - type: double
-  - name: fminimumf
+  - name: exp2f
     standards:
       - stdc
     return_type: float
     arguments:
       - type: float
+  - name: exp2m1f
+    standards:
+      - stdc
+    return_type: float
+    arguments:
       - type: float
-  - name: fminimuml
+  - name: expf
     standards:
       - stdc
-    return_type: long double
+    return_type: float
     arguments:
-      - type: long double
-      - type: long double
-  - name: fminimum_num
+      - type: float
+  - name: expm1
     standards:
       - stdc
     return_type: double
     arguments:
       - type: double
-      - type: double
-  - name: fminimum_numf
+  - name: expm1f
     standards:
       - stdc
     return_type: float
     arguments:
       - type: float
-      - type: float
-  - name: fminimum_mag
+  - name: f16add
     standards:
-      - stdc
-    return_type: double
+      - llvm_libc_ext
+    return_type: _Float16
     arguments:
       - type: double
       - type: double
-  - name: fminimum_magf
+    guard: LIBC_TYPES_HAS_FLOAT16
+  - name: f16addf
     standards:
-      - stdc
-    return_type: float
+      - llvm_libc_ext
+    return_type: _Float16
     arguments:
       - type: float
       - type: float
-  - name: fminimum_magl
+    guard: LIBC_TYPES_HAS_FLOAT16
+  - name: f16addf128
     standards:
       - stdc
-    return_type: long double
+    return_type: _Float16
+    arguments:
+      - type: float128
+      - type: float128
+    guard: LIBC_TYPES_HAS_FLOAT16_AND_FLOAT128
+  - name: f16addl
+    standards:
+      - llvm_libc_ext
+    return_type: _Float16
     arguments:
       - type: long double
       - type: long double
-  - name: fminimum_mag_num
+    guard: LIBC_TYPES_HAS_FLOAT16
+  - name: f16div
     standards:
-      - stdc
-    return_type: double
+      - llvm_libc_ext
+    return_type: _Float16
     arguments:
       - type: double
       - type: double
-  - name: fminimum_mag_numf
+    guard: LIBC_TYPES_HAS_FLOAT16
+  - name: f16divf
     standards:
-      - stdc
-    return_type: float
+      - llvm_libc_ext
+    return_type: _Float16
     arguments:
       - type: float
       - type: float
-  - name: fminimum_mag_numl
+    guard: LIBC_TYPES_HAS_FLOAT16
+  - name: f16divf128
     standards:
       - stdc
-    return_type: long double
+    return_type: _Float16
+    arguments:
+      - type: float128
+      - type: float128
+    guard: LIBC_TYPES_HAS_FLOAT16_AND_FLOAT128
+  - name: f16divl
+    standards:
+      - llvm_libc_ext
+    return_type: _Float16
     arguments:
       - type: long double
       - type: long double
-  - name: fma
+    guard: LIBC_TYPES_HAS_FLOAT16
+  - name: f16fma
     standards:
-      - stdc
-    return_type: double
+      - llvm_libc_ext
+    return_type: _Float16
     arguments:
       - type: double
       - type: double
       - type: double
-  - name: fmaf
+    guard: LIBC_TYPES_HAS_FLOAT16
+  - name: f16fmaf
     standards:
-      - stdc
-    return_type: float
+      - llvm_libc_ext
+    return_type: _Float16
     arguments:
       - type: float
       - type: float
       - type: float
-  - name: fmod
+    guard: LIBC_TYPES_HAS_FLOAT16
+  - name: f16fmaf128
     standards:
       - stdc
-    return_type: double
+    return_type: _Float16
+    arguments:
+      - type: float128
+      - type: float128
+      - type: float128
+    guard: LIBC_TYPES_HAS_FLOAT16_AND_FLOAT128
+  - name: f16fmal
+    standards:
+      - llvm_libc_ext
+    return_type: _Float16
+    arguments:
+      - type: long double
+      - type: long double
+      - type: long double
+    guard: LIBC_TYPES_HAS_FLOAT16
+  - name: f16mul
+    standards:
+      - llvm_libc_ext
+    return_type: _Float16
     arguments:
       - type: double
       - type: double
-  - name: fmodf
+    guard: LIBC_TYPES_HAS_FLOAT16
+  - name: f16mulf
     standards:
-      - stdc
-    return_type: float
+      - llvm_libc_ext
+    return_type: _Float16
     arguments:
       - type: float
       - type: float
-  - name: fmodl
+    guard: LIBC_TYPES_HAS_FLOAT16
+  - name: f16mulf128
     standards:
       - stdc
-    return_type: long double
+    return_type: _Float16
+    arguments:
+      - type: float128
+      - type: float128
+    guard: LIBC_TYPES_HAS_FLOAT16_AND_FLOAT128
+  - name: f16mull
+    standards:
+      - llvm_libc_ext
+    return_type: _Float16
     arguments:
       - type: long double
       - type: long double
-  - name: fmul
+    guard: LIBC_TYPES_HAS_FLOAT16
+  - name: f16sqrt
     standards:
-      - stdc
-    return_type: float
+      - llvm_libc_ext
+    return_type: _Float16
     arguments:
       - type: double
-      - type: double
-  - name: fmull
+    guard: LIBC_TYPES_HAS_FLOAT16
+  - name: f16sqrtf
     standards:
-      - stdc
-    return_type: float
+      - llvm_libc_ext
+    return_type: _Float16
     arguments:
-      - type: long double
-      - type: long double
-  - name: dmull
+      - type: float
+    guard: LIBC_TYPES_HAS_FLOAT16
+  - name: f16sqrtf128
     standards:
-      - stdc
-    return_type: double
+      - llvm_libc_ext
+    return_type: _Float16
+    arguments:
+      - type: float128
+    guard: LIBC_TYPES_HAS_FLOAT16_AND_FLOAT128
+  - name: f16sqrtl
+    standards:
+      - llvm_libc_ext
+    return_type: _Float16
     arguments:
       - type: long double
-      - type: long double
-  - name: frexp
+    guard: LIBC_TYPES_HAS_FLOAT16
+  - name: f16sub
     standards:
-      - stdc
-    return_type: double
+      - llvm_libc_ext
+    return_type: _Float16
     arguments:
       - type: double
-      - type: int *
-  - name: frexpf
+      - type: double
+    guard: LIBC_TYPES_HAS_FLOAT16
+  - name: f16subf
     standards:
-      - stdc
-    return_type: float
+      - llvm_libc_ext
+    return_type: _Float16
     arguments:
       - type: float
-      - type: int *
-  - name: frexpl
+      - type: float
+    guard: LIBC_TYPES_HAS_FLOAT16
+  - name: f16subf128
     standards:
       - stdc
-    return_type: long double
+    return_type: _Float16
+    arguments:
+      - type: float128
+      - type: float128
+    guard: LIBC_TYPES_HAS_FLOAT16_AND_FLOAT128
+  - name: f16subl
+    standards:
+      - llvm_libc_ext
+    return_type: _Float16
     arguments:
       - type: long double
-      - type: int *
-  - name: fromfp
+      - type: long double
+    guard: LIBC_TYPES_HAS_FLOAT16
+  - name: fabs
     standards:
       - stdc
     return_type: double
     arguments:
       - type: double
-      - type: int
-      - type: unsigned int
-  - name: fromfpf
+  - name: fabsf
     standards:
       - stdc
     return_type: float
     arguments:
       - type: float
-      - type: int
-      - type: unsigned int
-  - name: fromfpl
+  - name: fabsf128
+    standards:
+      - stdc
+    return_type: float128
+    arguments:
+      - type: float128
+    guard: LIBC_TYPES_HAS_FLOAT128
+  - name: fabsf16
+    standards:
+      - stdc
+    return_type: _Float16
+    arguments:
+      - type: _Float16
+    guard: LIBC_TYPES_HAS_FLOAT16
+  - name: fabsl
     standards:
       - stdc
     return_type: long double
     arguments:
       - type: long double
-      - type: int
-      - type: unsigned int
-  - name: fromfpx
+  - name: fdim
     standards:
       - stdc
     return_type: double
     arguments:
       - type: double
-      - type: int
-      - type: unsigned int
-  - name: fromfpxf
+      - type: double
+  - name: fdimf
     standards:
       - stdc
     return_type: float
     arguments:
       - type: float
-      - type: int
-      - type: unsigned int
-  - name: fromfpxl
+      - type: float
+  - name: fdimf128
+    standards:
+      - stdc
+    return_type: float128
+    arguments:
+      - type: float128
+      - type: float128
+    guard: LIBC_TYPES_HAS_FLOAT128
+  - name: fdimf16
+    standards:
+      - stdc
+    return_type: _Float16
+    arguments:
+      - type: _Float16
+      - type: _Float16
+    guard: LIBC_TYPES_HAS_FLOAT16
+  - name: fdiml
     standards:
       - stdc
     return_type: long double
     arguments:
       - type: long double
-      - type: int
-      - type: unsigned int
-  - name: ufromfp
+      - type: long double
+  - name: fdiv
     standards:
       - stdc
-    return_type: double
+    return_type: flo...
[truncated]

``````````

</details>


https://github.com/llvm/llvm-project/pull/102537


More information about the libc-commits mailing list