3432 Commits

Author SHA1 Message Date
David CARLIER
05280b582a
[OpenMP] Implements __kmp_is_address_mapped for Solaris/Illumos. (#82930)
Also fixing OpenMP build itself for this platform.
2024-03-08 20:34:43 +00:00
vadikp-intel
fcd2d48325
[OpenMP] runtime support for efficient partitioning of collapsed triangular loops (#83939)
This PR adds OMP runtime support for more efficient partitioning of
certain types of collapsed loops that can be used by compilers that
support loop collapsing (i.e. MSVC) to achieve more optimal thread load
balancing.

In particular, this PR addresses double nested upper and lower isosceles
triangular loops of the following types

1. lower triangular 'less_than'
   for (int i=0; i<N; i++)
     for (int j=0; j<i; j++)
2. lower triangular 'less_than_equal'
   for (int i=0; i<N; j++)
     for (int j=0; j<=i; j++)
3. upper triangular
   for (int i=0; i<N; i++)
     for (int j=i; j<N; j++)

Includes tests for the three supported loop types.

---------

Co-authored-by: Vadim Paretsky <b-vadipa@microsoft.com>
2024-03-07 16:28:03 -08:00
Gheorghe-Teodor Bercea
5c752df1e1
[libomptarget][nextgen-plugin][NFC] Clean-up InputSignal checks (#83458)
Clean-up InputSignal checks.
2024-03-07 12:01:42 -05:00
Anchu Rajendran S
c03fd37d9b
[flang] Changes to map variables in link clause of declare target (#83643)
As per the OpenMP standard, "If a variable appears in a link clause on a
declare target directive that does not have a device_type clause with
the nohost device-type-description then it is treated as if it had
appeared in a map clause with a map-type of tofrom" is an implicit
mapping rule. Before this change, such variables were mapped as to by
default.
2024-03-07 08:23:58 -08:00
Ulrich Weigand
fb7cc73975 Revert "[libomptarget] Support BE ELF files in plugins-nextgen (#83976)"
This reverts commit 15b7b3182cc28f4f0b950bd73d931caa27b833ec.
2024-03-06 21:37:45 +01:00
Ulrich Weigand
70677c81de Revert "[libomptarget] Build plugins-nextgen for SystemZ (#83978)"
This reverts commit 3ecd38c8e1d34b1e4639a1de9f0cb56c7957cbd2.
2024-03-06 21:37:43 +01:00
Ulrich Weigand
d4f4f80236 Revert "[libomptarget] Fix CUDA plugin build regression"
This reverts commit b64482e23eefaef7738fde35d0b7c4174aaa6597.
2024-03-06 21:37:35 +01:00
Ulrich Weigand
b64482e23e [libomptarget] Fix CUDA plugin build regression
After 3ecd38c8e, the Handler.getELFObjectFile routine is no
longer available.  Call ELF64LEObjectFile::create directly,
which should always be suitable for CUDA images.
2024-03-06 21:00:25 +01:00
Ulrich Weigand
3ecd38c8e1
[libomptarget] Build plugins-nextgen for SystemZ (#83978)
The plugin was not getting built as the build_generic_elf64 macro
assumes the LLVM triple processor name matches the CMake processor name,
which is unfortunately not the case for SystemZ.

Fix this by providing two separate arguments instead.

Actually building the plugin exposed a number of other issues causing
various test failures. Specifically, I've had to add the SystemZ target
to
- CompilerInvocation::ParseLangArgs
- linkDevice in ClangLinuxWrapper.cpp
- OMPContext::OMPContext (to set the device_kind_cpu trait)
- LIBOMPTARGET_ALL_TARGETS in libomptarget/CMakeLists.txt
- a check_plugin_target call in libomptarget/src/CMakeLists.txt

Finally, I've had to set a number of test cases to UNSUPPORTED on
s390x-ibm-linux-gnu; all these tests were already marked as UNSUPPORTED
for x86_64-pc-linux-gnu and aarch64-unknown-linux-gnu and are failing on
s390x for what seem to be the same reason.

In addition, this also requires support for BE ELF files in
plugins-nextgen: https://github.com/llvm/llvm-project/pull/83976
2024-03-06 20:50:01 +01:00
Ulrich Weigand
15b7b3182c
[libomptarget] Support BE ELF files in plugins-nextgen (#83976)
Code in plugins-nextgen reading ELF files is currently hard-coded to
assume a 64-bit little-endian ELF format. Unfortunately, this assumption
is even embedded in the interface between GlobalHandler and Utils/ELF
routines, which use ELF64LE types.

To fix this, I've refactored the interface to push all ELF specific
types into Utils/ELF. Specifically, this patch removes both the
getSymbol and getSymbolAddress routines and replaces them with a
single findSymbolInImage, which gets a StringRef identifying the
raw object file image as input, and returns a StringRef covering
the data addressed by the symbol (address and size) if found, or
std::nullopt otherwise.

This allows properly templating over multiple ELF format variants inside
Utils/ELF; specifically, this patch adds support for 64-bit big-endian
ELF files in addition to 64-bit little-endian files.
2024-03-06 20:49:12 +01:00
Jonathan Schilling
20459ddc82
[openmp] Clarify error message if TSan is missing (#70916)
For an uninformed user, the error message might refer to a missing "TSan
stopping operation", rather than indicating that TSan is missing **and
therefore** operation is stopped.
2024-03-06 16:11:56 +05:30
Ye Luo
0fa04b6e2c [libomptarget] Fix libomptarget.rtl.amdgpu.so installation
If AMD GPUs don't exist when building libomptarget, the early return causes skipping the plugin installation.
2024-03-05 21:32:48 -06:00
Daniel Martinez
aa6ebf9be1
Replace some C headers with C++ ones (#82697)
#81434

Replaced some C headers with C++ ones

Co-authored-by: Daniel Martinez <danielmartinez@cock.li>
2024-03-04 01:21:31 -05:00
Joseph Huber
2fb764d2da
[libomptarget] Fix 'libomptarget' libraries being installed twice (#83624)
Summary:
We use `add_llvm_library` as a shorthand for setting up all the
dependencies and libraries we need for the OpenMP offloading runtime as
they depend on a lot of the LLVM utilities. However, we always
explicitly installed these manually. Behind the scenes the function
would then install it again. This was unnoticed because until now the
destinations matched. Now that we want it to optionally go into the
other directory it is duplicating them. Fix this by stating that this is
a build tree only library so we can handle it ourselves.
2024-03-01 15:52:20 -06:00
Joseph Huber
1977404d20
[OpenMP] Respect LLVM per-target install directories (#83282)
Summary:
One recurring problem we have with the OpenMP libraries is that they are
potentially conflicting with ones found on the system, this occurs when
there are two copies and one is used for linking that it not attached to
the correspoding clang compiler. LLVM already uses target specific
directories for this, like with libc++, which are always searched first.
This patch changes the install directory to be
`lib/x86_64-unknown-linux-gnu` for example.

Notable changes would be that users will need to change their
LD_LIBRARY_PATH settings optionally, or use default rt-rpath options.
This should fix problems were users are linking the wrong versions of
static libraries
2024-02-28 15:39:27 -06:00
Jonathan Peyton
0e0bee26e7
[OpenMP] Fix distributed barrier hang for OMP_WAIT_POLICY=passive (#83058)
The resume thread logic inside __kmp_free_team() is faulty. Only
checking b_go for sleep status doesn't wake up distributed barrier.
Change to generic check for th_sleep_loc and calling
__kmp_null_resume_wrapper().

Fixes: #80664
2024-02-27 14:15:48 -06:00
Joachim
822142ffdf
[OpenMP][OMPD] libompd must not link libomp (#83119)
Fixes a regression introduced in 91ccd8248.
The code for libompd includes kmp.h for enum kmp_sched. The dependency
to hwloc is not necessary. Avoid the dependency by skipping the
definitions in kmp.h using types from hwloc.h.

Fixes #80750
2024-02-27 16:24:55 +01:00
Michael Klemm
99335a646b
[flang][OpenMP] Add missing implementation for 'omp_is_initial_device' (#83056)
Resolve issue #82047
2024-02-26 13:17:33 -08:00
Xing Xue
a4dcfbcb78
[OpenMP][AIX] XFAIL capacity tests on AIX in 32-bit (#83014)
This patch XFAILs two capacity tests on AIX in 32-bit because running
out resource with `4 x omp_get_max_threads()` in 32-bit mode.
2024-02-26 13:13:05 -05:00
Michael Halkenhäuser
e521752c04
[OpenMP][OMPT] Add OMPT callback for device data exchange 'Device-to-Device' (#81991)
Since there's no `ompt_target_data_transfer_tofrom_device` (within
ompt_target_data_op_t enum) or something other that conveys the meaning
of inter-device data exchange we decided to indicate a Device-to-Device
transfer by using: optype == ompt_target_data_transfer_from_device (=3)

Hence, a device transfer may be identified e.g. by checking for: (optype
== 3) &&
(src_device_num < omp_get_num_devices()) &&
(dest_device_num < omp_get_num_devices())

Fixes: #66478
2024-02-26 11:16:25 +01:00
David CARLIER
9e7c0b1385
[OpenMP] Implement __kmp_is_address_mapped on DragonFlyBSD. (#82895)
implement internal __kmp_is_address_mapped.
2024-02-25 14:13:04 +00:00
Joseph Huber
1a2ecbb398
[libc] Remove 'llvm-gpu-none' directory from build (#82816)
Summary:
This directory is leftover from when we handled both AMDGPU and NVPTX in
the same build and merged them into a pseudo triple. Now the only thing
it contains is the RPC server header. This gets rid of it, but now that
it's in the base install directory we should make it clear that it's an
LLVM libc header.
2024-02-23 14:11:31 -06:00
Joseph Huber
87b4108211
[Libomptarget][NFC] Remove concept of optional plugin functions (#82681)
Summary:
Ever since the introduction of the new plugins we haven't exercised the
concept of "optional" plugin functions. This is done in perparation for
making the plugins use a static interface as it will greatly simplify
the implementation if we assert that every function has the entrypoints.
Currently some unsupported functions will just return failure or some
other default value, so this shouldn't change anything.
2024-02-22 16:49:21 -06:00
Joseph Huber
47b7c91abe
[libc] Rework the GPU build to be a regular target (#81921)
Summary:
This is a massive patch because it reworks the entire build and
everything that depends on it. This is not split up because various bots
would fail otherwise. I will attempt to describe the necessary changes
here.

This patch completely reworks how the GPU build is built and targeted.
Previously, we used a standard runtimes build and handled both NVPTX and
AMDGPU in a single build via multi-targeting. This added a lot of
divergence in the build system and prevented us from doing various
things like building for the CPU / GPU at the same time, or exporting
the startup libraries or running tests without a full rebuild.

The new appraoch is to handle the GPU builds as strict cross-compiling
runtimes. The first step required
https://github.com/llvm/llvm-project/pull/81557 to allow the `LIBC`
target to build for the GPU without touching the other targets. This
means that the GPU uses all the same handling as the other builds in
`libc`.

The new expected way to build the GPU libc is with
`LLVM_LIBC_RUNTIME_TARGETS=amdgcn-amd-amdhsa;nvptx64-nvidia-cuda`.

The second step was reworking how we generated the embedded GPU library
by moving it into the library install step. Where we previously had one
`libcgpu.a` we now have `libcgpu-amdgpu.a` and `libcgpu-nvptx.a`. This
patch includes the necessary clang / OpenMP changes to make that not
break the bots when this lands.

We unfortunately still require that the NVPTX target has an `internal`
target for tests. This is because the NVPTX target needs to do LTO for
the provided version (The offloading toolchain can handle it) but cannot
use it for the native toolchain which is used for making tests.

This approach is vastly superior in every way, allowing us to treat the
GPU as a standard cross-compiling target. We can now install the GPU
utilities to do things like use the offload tests and other fun things.

Some certain utilities need to be built with 
`--target=${LLVM_HOST_TRIPLE}` as well. I think this is a fine
workaround as we
will always assume that the GPU `libc` is a cross-build with a
functioning host.

Depends on https://github.com/llvm/llvm-project/pull/81557
2024-02-22 15:29:29 -06:00
Daniel Martinez
45fe67dd61
Fix build on musl by including stdint.h (#81434)
openmp fails to build on musl since it lacks the defines for int32_t

Co-authored-by: Daniel Martinez <danielmartinez@cock.li>
2024-02-22 13:14:27 -08:00
Joseph Huber
ea174c0934
[Libomptarget] Remove global ctor and use reference counting (#80499)
Summary:
Currently we rely on global constructors to initialize and shut down the
OpenMP runtime library and plugin manager. This causes some issues
because we do not have a defined lifetime that we can rely on to release
and allocate resources. This patch instead adds some simple reference
counted initialization and deinitialization function.

A future patch will use the `deinit` interface to more intelligently
handle plugin deinitilization. Right now we do nothing and rely on
`atexit` inside of the plugins to tear them down. This isn't great
because it limits our ability to control these things.

Note that I made the `__tgt_register_lib` functions do the
initialization instead of adding calls to the new runtime functions in
the linker wrapper. The reason for this is because in the past it's been
easier to not introduce a new function call, since sometimes the user's
compiler will link against an older `libomptarget`. Maybe if we change
the name with offloading in the future we can simplify this.

Depends on https://github.com/llvm/llvm-project/pull/80460
2024-02-22 12:01:52 -06:00
Joseph Huber
cc374d8056
[OpenMP] Remove register_requires global constructor (#80460)
Summary:
Currently, OpenMP handles the `omp requires` clause by emitting a global
constructor into the runtime for every translation unit that requires
it. However, this is not a great solution because it prevents us from
having a defined order in which the runtime is accessed and used.

This patch changes the approach to no longer use global constructors,
but to instead group the flag with the other offloading entires that we
already handle. This has the effect of still registering each flag per
requires TU, but now we have a single constructor that handles
everything.

This function removes support for the old `__tgt_register_requires` and
replaces it with a warning message. We just had a recent release, and
the OpenMP policy for the past four releases since we switched to LLVM
is that we do not provide strict backwards compatibility between major
LLVM releases now that the library is versioned. This means that a user
will need to recompile if they have an old binary that relied on
`register_requires` having the old behavior. It is important that we
actively deprecate this, as otherwise it would not solve the problem of
having no defined init and shutdown order for `libomptarget`. The
problem of `libomptarget` not having a define init and shutdown order
cascades into a lot of other issues so I have a strong incentive to be
rid of it.

It is worth noting that the current `__tgt_offload_entry` only has space
for a 32-bit integer here. I am planning to overhaul these at some point
as well.
2024-02-21 11:33:32 -06:00
Xing Xue
94100bc2fb
[OpenMP][AIX]Add assembly file containing microtasking routines and unnamed common block definitions (#81770)
This patch adds assembly file `z_AIX_asm.S` that contains the 32- and
64-bit XCOFF version of microtasking routines and unnamed common block
definitions. This code has been run through the libomp LIT tests and a
user package successfully.
2024-02-20 12:08:37 -05:00
Gheorghe-Teodor Bercea
12ade6fc60
[libomptarget][test] Add support for APU testing feature. (#82054)
Add test and support for `// REQUIRES: apu` for the category of tests
which exercise APU specific behavior.

Note: when running on an actual APU you may have to use the following if
the architecture ID is not enough to determine if the underlying device
is an APU:

```
IS_APU=1 ninja check-openmp
```
2024-02-19 11:23:53 -05:00
Martin Storsjö
4b9c089381
[OpenMP] [test] Skip the -mlong-double-80 test on MSVC ABI (#81115)
Within the MSVC ABI, long doubles are the same as regular 64 bit
doubles. This test case, which is compiled with -mlong-double-80, cannot
work when libomp has been compiled without that flag, as
-mlong-double-80 changes the calling convention for the tested
functions.
2024-02-19 11:33:28 +02:00
Xing Xue
2de269a641
[OpenMP][AIX] Set worker stack size to 2 x KMP_DEFAULT_STKSIZE if system stack size is too big (#81996)
This patch sets the stack size of worker threads to `2 x
KMP_DEFAULT_STKSIZE` (2 x 4MB) for AIX if the system stack size is too
big. Also defines maximum stack size for 32-bit AIX.
2024-02-16 15:12:41 -05:00
Xing Xue
ac97562c99
[OpenMP][AIX]Define struct kmp_base_tas_lock with the order of two members swapped for big-endian (#79188)
The direct lock data structure has bit `0` (the least significant bit)
of the first 32-bit word set to `1` to indicate it is a direct lock. On
the other hand, the first word (in 32-bit mode) or first two words (in
64-bit mode) of an indirect lock are the address of the entry allocated
from the indirect lock table. The runtime checks bit `0` of the first
32-bit word to tell if this is a direct or an indirect lock. This works
fine for 32-bit and 64-bit little-endian because its memory layout of a
64-bit address is (`low word`, `high word`). However, this causes
problems for big-endian where the memory layout of a 64-bit address is
(`high word`, `low word`). If an address of the indirect lock table
entry is something like `0x110035300`, i.e., (`0x1`, `0x10035300`), it
is treated as a direct lock. This patch defines `struct
kmp_base_tas_lock` with the ordering of the two 32-bit members flipped
for big-endian PPC64 so that when checking/setting tags in member
`poll`, the second word (the low word) is used. This patch also changes
places where `poll` is not already explicitly specified for
checking/setting tags.
2024-02-13 15:11:24 -05:00
Carlos Galvez
15279e7569
[OpenMP] Remove -Wno-enum-constexpr-conversion (#81318)
This effectively reverts commit
9ff0cc7e0fa7e99163610d2fcb58e96f3315e343. For some reason "git revert"
lead to "no changes" after fixing conflicts, so a clean revert was not
possible.

The original issue (#57022) is no longer reproducible even with this
patch, so we can remove the suppression.

This is in line with our goal to make -Wenum-constexpr-conversion a
non-downgradeable error, see #59036.

Co-authored-by: Carlos Gálvez <carlos.galvez@zenseact.com>
2024-02-11 15:04:03 +01:00
Daniil Fukalov
94272a5a5d
[OpenMP] Fix libomp debug build. (#81029)
Disable libstdc++ assertions in the runtime library just like in
https://reviews.llvm.org/D143168.
2024-02-09 17:54:14 +01:00
Martin Storsjö
72f04fa073
[OpenMP] [cmake] Don't use -fno-semantic-interposition on Windows (#81113)
This was added in 4b7beab4187ab0766c3d7b272511d5751431a8da. When the
flag was added implicitly elsewhere, it was added via
llvm/cmake/modules/HandleLLVMOptions.cmake, where it wasn't added on
Windows/Cygwin targets.

This avoids one warning per object file in OpenMP.
2024-02-08 15:28:46 +02:00
Martin Storsjö
9ac82f0d3e
[OpenMP] [cmake] In standalone mode, make Python3_EXECUTABLE available (#80828)
When running the tests, we try to invoke them as
"${Python3_EXECUTABLE} ${OPENMP_LLVM_LIT_EXECUTABLE}", but when running
"find_package(Python3)" within the function
"find_standalone_test_dependencies", the variable "Python3_EXECUTABLE"
only gets set within the function scope.

Tests have worked regardless of this in many cases, where executing the
python script directly succeeds. But for consistency, and for working in
cases when the python script can't be executed as such, make the
Python3_EXECUTABLE variable available as intended.
2024-02-08 11:45:57 +02:00
dhruvachak
0d7f232baf
[libomptarget] [OMPT] Fixed return address computation for OMPT events. (#80498)
Currently, __builtin_return_address is used to generate the return
address when the callback invoker is created. However, this may result
in the return address pointing to an internal runtime function. This is
not what a tool would typically want. A tool would want to know the
corresponding user code from where the runtime entry point is invoked.

This change adds a thread local variable that is assigned the return
address at the OpenMP runtime entry points. An RAII is used to manage
the modifications to the thread local variable. Whenever the return
address is required for OMPT events, it is read from the thread local
variable.
2024-02-07 17:29:08 -08:00
Xing Xue
7a9b0e4acb
[OpenMP][test]Flip bit-fields in 'struct flags' for big-endian in test cases (#79895)
This patch flips bit-fields in `struct flags` for big-endian in test
cases to be consistent with the definition of the structure in libomp
`kmp.h`.
2024-02-07 15:24:52 -05:00
carlobertolli
12aad1a53c
[OpenMP] Support for global variables when in auto zero-copy. (#80876)
When building without unified_shared_memory, global variables are
declared in the device binary and allocated upon loading onto GPU
memory. However, when running in zero-copy mode (same as with
unified_shared_memory) D2H and H2D copies for mapped local and global
variables are turned off. This patch turns back on H2D and D2H copies
when they refer to global variables, enabling an application built
without unified_shared_memory to work correctly with global variables
when run under automatic zero-copy.

Co-authored-by: Doru Bercea <doru.bercea@amd.com>
Co-authored-by: Jan-Patrick Lehr <janpatrick.lehr@amd.com>
2024-02-06 15:08:32 -06:00
Jan Patrick Lehr
6ce4181137
[OpenMP] HSA_ENABLE_SDMA visible in libomptarget tests (#80860)
Enable the environment variable inside the test environment. This allows
to disable SDMA engine transfers as a potential mitigation of flaky
OpenMP offloading tests on AMDGPU.

Motivated by the open ticket https://github.com/ROCm/ROCm/issues/2616
about a missed synchronization signal.
2024-02-06 17:22:09 +01:00
vigbalu
edfc21a575
[OMPD] Runtime Entry Point functions for OMPD in libomp.so need C linkage as per standard. (#79246)
Adding extern "C" to all the entry point functions to make sure that
these functions are not mangled.
2024-02-06 10:12:47 +01:00
agozillon
95fe47ca7e
[Flang][OpenMP] Initial mapping of Fortran pointers and allocatables for target devices (#71766)
This patch seeks to add an initial lowering for pointers and allocatable variables 
captured by implicit and explicit map in Flang OpenMP for Target operations that 
take map clauses e.g. Target, Target Update. Target Exit/Enter etc.

Currently this is done by treating the type that lowers to a descriptor 
(allocatable/pointer/assumed shape) as a map of a record type (e.g. a structure) as that's
effectively what descriptor types lower to in LLVM-IR and what they're represented as
in the Fortran runtime (written in C/C++). The descriptor effectively lowers to a structure
containing scalar and array elements that represent various aspects of the underlying
data being mapped (lower bound, upper bound, extent being the main ones of interest
in most cases) and a pointer to the allocated data. In this current iteration of the mapping
we map the structure in it's entirety and then attach the underlying data pointer and map
the data to the device, this allows most of the required data to be resident on the device
for use. Currently we do not support the addendum (another block of pointer data), but
it shouldn't be too difficult to extend this to support it.

The MapInfoOp generation for descriptor types is primarily handled in an optimization
pass, where it expands BoxType (descriptor types) map captures into two maps, one for
the structure (scalar elements) and the other for the pointer data (base address) and
links them in a Parent <-> Child relationship. The later lowering processes will then treat
them as a conjoined structure with a pointer member map.
2024-02-05 18:45:07 +01:00
Joseph Huber
0ac4438560
[Libomptarget] Remove unused 'SupportsEmptyImages' API function (#80316)
Summary:
This function is always false in the current implementation and is not
even considered required. Just remove it and if someone needs it in the
future they can add it back in. This is done to simplify the interface
prior to other changes
2024-02-05 10:00:09 -06:00
Joseph Huber
2333865546
[Libomptarget] Fix data mapping on dynamic loads (#80559)
Summary:
The current logic tries to map target mapping tables to the current
device. Right now it assumes that data is only mapped a single time per
device. This is only true if we have a single instance of the runtime
running on a single program. However, in the case of dynamic library
loads or shared libraries, this may happen multiple times.

Given a case of a simple dynamic library load which has its own target
kernel instruction, the current logic had only the first call to
`__tgt_target_kernel` to the data mapping for that device. Then, when
the next dynamic library load got called, it would see that the global
were already mapped for that device and skip registering its own
entires, even though they were distinct. This resulted in none of the
mappings being done and hitting an assertion.

This patch simply gets rid of this per-device check. The check should
instead be on the host offloading entries. We already have logic that
calls `continue` if we already have entries for that pointer, so we can
simply rely on that instead.
2024-02-03 15:28:20 -06:00
Martin Storsjö
2d2f962c9b
[openmp] Add a dependency on the separate import library (#80449)
Currently, when doing e.g. "ninja check-openmp", the check-openmp target
only depends on the target "omp", which builds the library. Thus by
doing that, the separate import library "libomp.lib", which is generated
directly from a def file, never gets created, unless one does a separate
invocation first, that builds all targets.

To fix this, make the "omp" target depend on the target for the separate
import library, whenever that is created/used.
2024-02-03 01:06:40 +01:00
Kelvin Li
a063df20ab
[OpenMP] Fix typo (NFC) (#80332) 2024-02-01 15:13:17 -05:00
Kelvin Li
cc0c8e592f
[OpenMP] Fix build breakage (NFC) (#80313)
Assign `nullptr` to the pointer instead.
2024-02-01 12:33:23 -06:00
Alexandre Ganea
d2565bb113
[openmp] On Windows, fix standalone cmake build (#80174)
This fixes: https://github.com/llvm/llvm-project/issues/80117
2024-02-01 08:14:05 -05:00
Joseph Huber
254287658f
[Libomptarget] Remove handling of old ctor / dtor entries (#80153)
Summary:
A previous patch removed creating these entries in clang in favor of the
backend emitting a callable kernel and having the runtime call that if
present. The support for the old style was kept around in LLVM 18.0 but
now that we have forked to 19.0 we should remove the support.

The effect of this would be that an application linking against a newer
libomptarget that still had the old constructors will no longer be
called. In that case, they can either recompile or use the
`libomptarget.so.18` that comes with the previous release.
2024-01-31 11:48:07 -06:00
Saiyedul Islam
5f6640e268
[OpenMP52][LIBOMPTARGET] Do not throw error in omp_get_mapped_ptr for the host (#80038)
OpenMP spec 5.2 specifies return value to be the host ptr
in case of device_num being same as omp_get_initial_device().
2024-01-30 23:59:54 +05:30