[all-commits] [llvm/llvm-project] 74e2f4: [libomp] Add kmp_str_ref (ADT 1/2)

Robert Imschweiler via All-commits all-commits at lists.llvm.org
Thu Jan 15 03:05:32 PST 2026


  Branch: refs/heads/users/ro-i/omp-device-trait-parser
  Home:   https://github.com/llvm/llvm-project
  Commit: 74e2f4103575adab6a5a1159e4813a8aacfcf46d
      https://github.com/llvm/llvm-project/commit/74e2f4103575adab6a5a1159e4813a8aacfcf46d
  Author: Robert Imschweiler <robert.imschweiler at amd.com>
  Date:   2026-01-15 (Thu, 15 Jan 2026)

  Changed paths:
    A openmp/runtime/src/kmp_adt.h
    M openmp/runtime/src/kmp_str.cpp
    M openmp/runtime/src/kmp_str.h
    A openmp/runtime/unittests/ADT/CMakeLists.txt
    A openmp/runtime/unittests/ADT/TestStringRef.cpp
    M openmp/runtime/unittests/CMakeLists.txt
    M openmp/runtime/unittests/String/TestKmpStr.cpp

  Log Message:
  -----------
  [libomp] Add kmp_str_ref (ADT 1/2)

libomp currently has two limitations:
1) although it's C++, it doesn't link against the C++ stdlib
2) it cannot link against the implementation of LLVM ADTs

These limitations shall not be altered at the moment.

As a result, this commit introduces kmp_str_ref, which is similar to
LLVM's StringRef. It currently only includes methods I need at the
moment, but it's easily extensible.


  Commit: 31a5ac60d9a138fdc65dbd19cc1fe8f86beaea3e
      https://github.com/llvm/llvm-project/commit/31a5ac60d9a138fdc65dbd19cc1fe8f86beaea3e
  Author: Robert Imschweiler <robert.imschweiler at amd.com>
  Date:   2026-01-15 (Thu, 15 Jan 2026)

  Changed paths:
    M openmp/runtime/src/kmp_adt.h
    M openmp/runtime/unittests/ADT/CMakeLists.txt
    A openmp/runtime/unittests/ADT/TestVector.cpp

  Log Message:
  -----------
  [libomp] Add kmp_vector (ADT 2/2)

See rationale in the commit adding kmp_str_ref.

This commit introduces kmp_vector, a class intended primarily for small
vectors. It currently only includes methods I need at the moment, but
it's easily extensible.


  Commit: 14167244e1c4d0999d8be89535081828218af685
      https://github.com/llvm/llvm-project/commit/14167244e1c4d0999d8be89535081828218af685
  Author: Robert Imschweiler <robert.imschweiler at amd.com>
  Date:   2026-01-15 (Thu, 15 Jan 2026)

  Changed paths:
    M openmp/runtime/src/CMakeLists.txt
    M openmp/runtime/src/i18n/en_US.txt
    M openmp/runtime/src/kmp_settings.cpp
    A openmp/runtime/src/kmp_traits.cpp
    A openmp/runtime/src/kmp_traits.h
    M openmp/runtime/unittests/CMakeLists.txt
    A openmp/runtime/unittests/Traits/CMakeLists.txt
    A openmp/runtime/unittests/Traits/MockOMP.cpp
    A openmp/runtime/unittests/Traits/TestOMPTraitParser.cpp
    A openmp/runtime/unittests/Traits/TestOMPTraits.cpp

  Log Message:
  -----------
  [libomp] OpenMP 6.0: Add device trait parser

OpenMP 6.0 introduced a device trait specification language for the
environment variables OMP_AVAILABLE_DEVICES (4.3.7) and
OMP_DEFAULT_DEVICE (4.3.8).

This commit defines a grammar for that language and implements a parser
for a large part of this grammar.
It also already does the parsing of OMP_DEFAULT_DEVICE, but in a
backward compatible manner, not yet exposing the new capabilities to the
user (this will come in a follow-up commit).


Compare: https://github.com/llvm/llvm-project/compare/74e2f4103575%5E...14167244e1c4

To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list