[all-commits] [llvm/llvm-project] 72bfe2: [libc] Support the string conversion methods on th...

Joseph Huber via All-commits all-commits at lists.llvm.org
Thu Apr 27 18:32:17 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 72bfe2c05a09e39c6e9c8f35fcbbd9322ed56432
      https://github.com/llvm/llvm-project/commit/72bfe2c05a09e39c6e9c8f35fcbbd9322ed56432
  Author: Joseph Huber <jhuber6 at vols.utk.edu>
  Date:   2023-04-27 (Thu, 27 Apr 2023)

  Changed paths:
    M libc/config/gpu/api.td
    M libc/config/gpu/entrypoints.txt
    M libc/config/gpu/headers.txt
    M libc/docs/gpu/support.rst
    M libc/include/llvm-libc-types/fenv_t.h
    M libc/src/__support/FPUtil/PlatformDefs.h

  Log Message:
  -----------
  [libc] Support the string conversion methods on the GPU

This patch enables us to use the existing `libc` support for string
conversion functions on the GPU. This required setting the `fenv_t` and
long double configuration. As far as I am aware, long doubles are
converted to doubles on the GPU and the floating point environment is
just an `uint32_t`.

This code is still untested as we are still working out how to run the
unit tests on the GPU.

Reviewed By: michaelrj

Differential Revision: https://reviews.llvm.org/D149306


  Commit: f7d5e9bc4ce5db276d5c0965dde4c4d323f699d1
      https://github.com/llvm/llvm-project/commit/f7d5e9bc4ce5db276d5c0965dde4c4d323f699d1
  Author: Joseph Huber <jhuber6 at vols.utk.edu>
  Date:   2023-04-27 (Thu, 27 Apr 2023)

  Changed paths:
    M libc/config/gpu/entrypoints.txt
    M libc/docs/gpu/support.rst

  Log Message:
  -----------
  [libc] Support the `abs` functions in the GPU libc.

This patch simply enables building the integer `abs` functions for the
GPU.

Reviewed By: sivachandra

Differential Revision: https://reviews.llvm.org/D149317


  Commit: 443d71527be0a052b2f533e4ad540733279ce46b
      https://github.com/llvm/llvm-project/commit/443d71527be0a052b2f533e4ad540733279ce46b
  Author: Joseph Huber <jhuber6 at vols.utk.edu>
  Date:   2023-04-27 (Thu, 27 Apr 2023)

  Changed paths:
    M libc/config/gpu/entrypoints.txt
    M libc/src/stdlib/CMakeLists.txt
    A libc/src/stdlib/_Exit.cpp
    M libc/src/stdlib/exit.cpp
    M libc/src/stdlib/linux/CMakeLists.txt
    R libc/src/stdlib/linux/_Exit.cpp

  Log Message:
  -----------
  [libc] Implement `exit` for the GPU partially

This patch implements the `exit` function on the GPU. This required
breaking the entrypoints calling eachother on `linux` since this doesn't
work with a non-aliased target. This is only partial support because
full support requires a malloc / free implementation for the exit
callbacks array.

Reviewed By: sivachandra

Differential Revision: https://reviews.llvm.org/D149363


Compare: https://github.com/llvm/llvm-project/compare/db381405ced7...443d71527be0


More information about the All-commits mailing list