summaryrefslogtreecommitdiffstats
path: root/openmp/libomptarget/src
Commit message (Collapse)AuthorAgeFilesLines
* [libomptarget] Added install component for libomptargetVyacheslav Zakharin2019-01-021-1/+2
| | | | | | Differential Revision: https://reviews.llvm.org/D56108 llvm-svn: 350254
* [OPENMP]Make lambda mapping follow reqs for PTR_AND_OBJ mapping.Alexey Bataev2018-11-081-5/+6
| | | | | | | | | | | | | | | Summary: The base pointer for the lambda mapping must point to the lambda capture placement and pointer must point to the captured variable itself. Patch fixes this problem. Reviewers: gtbercea Subscribers: guansong, openmp-commits, kkwli0, caomhin Differential Revision: https://reviews.llvm.org/D54260 llvm-svn: 346407
* [OPENMP][OFFLOADING]Change the lambda capturing flags.Alexey Bataev2018-11-021-1/+1
| | | | | | | | | | | | | | | Summary: The previously used combination `PTR_AND_OBJ | PRIVATE` could be used for mapping of some data in Fortran. Changed it to `PTR_AND_OBJ | LITERAL`. Reviewers: gtbercea Subscribers: guansong, caomhin, openmp-commits Differential Revision: https://reviews.llvm.org/D54035 llvm-svn: 345981
* [LIBOMPTARGET] Add support for mapping of lambda captures.Alexey Bataev2018-10-301-0/+42
| | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Added support for correct mapping of variables captured by reference in lambdas. That kind of mapping may appear only in target-executable regions and must follow the original lambda or another lambda capture for the same lambda. The expected data: base address - the address of the lambda, begin pointer - pointer to the address of the lambda capture, size - size of the captured variable. When OMP_TGT_MAPTYPE_PTR_AND_OBJ mapping type is seen in target-executable region, the target address of the last processed item is taken as the address of the original lambda `tgt_lambda_ptr`. Then, the pointer to capture on the device is calculated like `tgt_lambda_ptr + (host_begin_pointer - host_begin_base)` and the target-based address of the original variable (which host address is `*(void**)begin_pointer`) is written to that pointer. Reviewers: kkwli0, gtbercea, grokos Subscribers: openmp-commits Differential Revision: https://reviews.llvm.org/D51107 llvm-svn: 345608
* [OPENMP]Increment iterator when the loop is continued.Alexey Bataev2018-09-111-1/+3
| | | | | | | | | | | | | | Summary: Missed operation of the incrementing iterator when required just to continue execution. Reviewers: kkwli0, gtbercea, grokos Subscribers: guansong, openmp-commits Differential Revision: https://reviews.llvm.org/D51937 llvm-svn: 341964
* [libomptarget] Remove two unneeded includes, NFCI.Jonas Hahnfeld2018-09-062-2/+0
| | | | | | Follow-up to r340542 and r340767. llvm-svn: 341563
* [libomptarget] Remove `Devices` from `RTLInfoTy`Sergey Dmitriev2018-09-042-6/+1
| | | | | | | | This patch removes unused field `Devices` from `RTLInfoTy`. Differential Revision: https://reviews.llvm.org/D51653 llvm-svn: 341399
* [libomptarget] PR38704: Fix erase of ShadowPtrMapJonas Hahnfeld2018-09-041-2/+4
| | | | | | | | | | | | | erase() invalidates the iterator and returns a new one pointing to the following element. The code now follows the example at https://en.cppreference.com/w/cpp/container/map/erase. (The added testcase crashes without this patch.) Reported by David Binderman (https://llvm.org/PR38704)! Differential Revision: https://reviews.llvm.org/D51623 llvm-svn: 341371
* [OpenMP][libomptarget] rework of fatal error reportingAlexandre Eichenberger2018-08-273-23/+21
| | | | | | | | | | | | | | | | Summary: Removed the function that used a lock and varargs Used the same mechanism as for debug messages Reviewers: ABataev, gtbercea, grokos, Hahnfeld Reviewed By: gtbercea, Hahnfeld Subscribers: mikerice, ABataev, RaviNarayanaswamy, guansong, openmp-commits Differential Revision: https://reviews.llvm.org/D51226 llvm-svn: 340767
* [OpenMP][libomptarget] Bringing up to spec with respect to ↵Alexandre Eichenberger2018-08-234-66/+174
| | | | | | | | | | | | | | | | | | OMP_TARGET_OFFLOAD env var Summary: Right now, only the OMP_TARGET_OFFLOAD=DISABLED was implemented. Added support for the other MANDATORY and DEFAULT values. Reviewers: gtbercea, ABataev, grokos, caomhin, Hahnfeld Reviewed By: Hahnfeld Subscribers: protze.joachim, gtbercea, AlexEichenberger, RaviNarayanaswamy, Hahnfeld, guansong, openmp-commits Differential Revision: https://reviews.llvm.org/D50522 llvm-svn: 340542
* [OpenMP][libomptarget] New map interface: remove translation code and ensure ↵George Rokos2018-07-192-329/+144
| | | | | | | | | | | | | | | proper alignment of struct members This patch removes the translation code since this functionality is now implemented in the compiler. target_data_begin and target_data_end are also patched to handle some special cases that used to be handled by the obsolete translation function, namely ensure proper alignment of struct members when we have partially mapped structs. Mapping a struct from a higher address (i.e. not from its beginning) can result in distortion of the alignment for some of its member fields. Padding restores the original (proper) alignment. Differential revision: https://reviews.llvm.org/D44186 llvm-svn: 337455
* [CMake] Unify install path for librariesJonas Hahnfeld2018-05-251-1/+1
| | | | | | | | | | Introduce OPENMP_INSTALL_LIBDIR and use in all install() commands. This also fixes installation of libomptarget-nvptx that previously didn't honor {OPENMP,LLVM}_LIBDIR_SUFFIX. Differential Revision: https://reviews.llvm.org/D47130 llvm-svn: 333284
* Bugfix, extern declarations for libomp functions are `extern "C"` declarationsGeorge Rokos2018-03-171-0/+6
| | | | llvm-svn: 327763
* Moved extern declarations to private header file, they are only used from ↵George Rokos2018-03-161-0/+4
| | | | | | within libomptarget, they don't need to be in omptarget.h. llvm-svn: 327740
* Sprinkle a few <cstdlib> includes, for libomptarget sources usingDimitry Andric2018-01-183-0/+3
| | | | | | malloc, free, alloca and getenv. NFCI. llvm-svn: 322869
* Add missing headers for Debug buildsJonas Hahnfeld2018-01-182-0/+2
| | | | llvm-svn: 322830
* [libomptarget] Split implementation of interface functionsJonas Hahnfeld2017-12-064-484/+520
| | | | | | | | | | | | This last of four patches adds a new file for the interface functions that Clang uses during code generation. The only change except simply moving the current code is renaming the function CheckDeviceAndCtors() and using the correct type for 64bit device ids. Differential Revision: https://reviews.llvm.org/D40801 llvm-svn: 319972
* [libomptarget] Split implementation of API functionsJonas Hahnfeld2017-12-065-297/+316
| | | | | | | | | | This third patch moves the implementation of the user-facing OpenMP API functions into its own file. For now, the code is only moved, no cleanups applied yet. Differential Revision: https://reviews.llvm.org/D40800 llvm-svn: 319971
* [libomptarget] Split device functionalityJonas Hahnfeld2017-12-064-321/+339
| | | | | | | | | | This is the second patch to split the current monolithic implementation into separate files. Note that this change doesn't cleanup the code yet. Differential Revision: https://reviews.llvm.org/D40799 llvm-svn: 319970
* [libomptarget] Split RTL plugin functionalityJonas Hahnfeld2017-12-066-629/+742
| | | | | | | | | | | This is the first of four patches to split the target agnostic library into multiple (smaller) files. It only moves the code to separate implementation files and does no cleanup (yet) except removing unneeded headers. Differential Revision: https://reviews.llvm.org/D40798 llvm-svn: 319969
* [libomptarget] Move header files and CMake library definitionJonas Hahnfeld2017-12-064-329/+55
| | | | | | | | | | | | | | Future patches will add (private) header files in src/ that should not be visible to plugins, so move the "public" ones to a new include/ directory. This is still internal in a sense that the contained files won't be installed for the user. Similarly, the target agnostic offloading library should be built directly in src/. The parent directory is responsible for finding dependencies and including all subdirectories. Differential Revision: https://reviews.llvm.org/D40797 llvm-svn: 319968
* [Clang][OpenMP] New clang/libomptarget map interface: new function ↵George Rokos2017-11-212-57/+57
| | | | | | | | | | | signatures, libomptarget-side This is the libomptarget-side patch which changes the __tgt_* API function signatures in preparation for the new map interface. Changes are: Device IDs 32bits --> 64bits, Flags 32bits --> 64bits Differential revision: https://reviews.llvm.org/D40313 llvm-svn: 318790
* Revert "Rename fields of ompt_frame_t"Jonas Hahnfeld2017-11-031-3/+0
| | | | | | This reverts commit r317338 which discarded some recent commits. llvm-svn: 317347
* Rename fields of ompt_frame_tJoachim Protze2017-11-031-0/+3
| | | | | | | | | | This is part of the renaming of data types from OpenMP TR4 to TR6 Patch by Simon Convent Differential Revision: https://reviews.llvm.org/D39326 llvm-svn: 317338
* [libomptarget] Remove stale omp handleJonas Hahnfeld2017-11-021-3/+0
| | | | | | | | | This was never used in the upstream compiler and was responsible for some problems with reductions in the clang-ykt fork. Differential Revision: https://reviews.llvm.org/D39553 llvm-svn: 317214
* [OpenMP] libomptarget: move debugging dumps under control of env var ↵Sergey Dmitriev2017-08-141-1/+19
| | | | | | | | | | | | | | | LIBOMPTARGET_DEBUG Disable default debugging dumps for libomptarget and plugins and move dumps under control of environment variable LIBOMPTARGET_DEBUG=<integer>. Dumps are enabled when LIBOMPTARGET_DEBUG is set to a positive integer value. Debugging dumps are available only in debug build; release build does not support it. Differential Revision: https://reviews.llvm.org/D33227 llvm-svn: 310841
* [OpenMP] Prevent unused-variable warning in libomptarget when compiling in ↵Samuel Antao2017-06-091-0/+4
| | | | | | Release mode. llvm-svn: 305090
* [OpenMP] libomptarget: eliminate compiler warnings at buildGeorge Rokos2017-06-021-10/+10
| | | | | | | | Thanks to Sergey Dmitriev for submitting the patch. Differential Revision: https://reviews.llvm.org/D33851 llvm-svn: 304601
* [OpenMP] Changes in the plugin interfaceGeorge Rokos2017-05-103-31/+136
| | | | | | | | | | | This patch chagnes the plugin interface so that: 1) future plugins can take advantage of systems with shared CPU/device storage 2) instead of using base addresses, target regions are launched by providing target addresseds and base offsets explicitly. Differential revision: https://reviews.llvm.org/D33028 llvm-svn: 302663
* [OpenMP] libomptarget: Set ref count for global objects to positive infinityGeorge Rokos2017-04-221-5/+15
| | | | | | Differential Revision: https://reviews.llvm.org/D32326 llvm-svn: 301076
* [OpenMP] libomptarget: Remove obsolete negative device IDs -2/-3George Rokos2017-04-222-16/+0
| | | | | | Differential Revision: https://reviews.llvm.org/D32325 llvm-svn: 301075
* [OpenMP] Allow multiple weak symbols to be loaded from the fat binaryGeorge Rokos2017-03-221-10/+9
| | | | | | | | For compatibility with Fortran. Differential Revision: https://reviews.llvm.org/D31205 llvm-svn: 298516
* Add AArch64 support.Paul Osmialowski2017-03-061-1/+2
| | | | | | | | This adds AArch64 support to recently added part of the runtime responsible for offloading to target. This piece of code allows offloading-to-self on AArch64 machines. Differential Revision: https://reviews.llvm.org/D30644 llvm-svn: 297070
* [OpenMP] libomptarget: Protect parent struct from being deallocatedGeorge Rokos2017-02-151-8/+19
| | | | | | | | Fixed bug due to which a parent struct was deallocated when one of the struct's pointers was being unmapped. Differential Revision: https://reviews.llvm.org/D29914 llvm-svn: 295231
* [OpenMP] Redefined macro warning in libomptargetGeorge Rokos2017-02-011-0/+3
| | | | | | | | Fixed compilation warning in libomptarget. Differential Revision: https://reviews.llvm.org/D29353 llvm-svn: 293747
* [libomptarget] Fix Debug build with glibc < 2.18Jonas Hahnfeld2017-01-301-0/+1
| | | | | | | | | | | glibc < 2.18 is C99 compliant and only provides the format macros in C++ if __STDC_FORMAT_MACROS is defined. This change fixes the debug build for GCC 4.8, GCC 6.2 and Clang 3.9.1 that were previously broken on my machine. It shows no regression for libc++ >= 4.0.0 which has a fix since September: http://lists.llvm.org/pipermail/cfe-commits/Week-of-Mon-20160926/171659.html llvm-svn: 293468
* [libomptarget] Fix compilation with libc++Jonas Hahnfeld2017-01-271-1/+1
| | | | | | | | iterator is only guaranteed to be default-constructible, without any argument. Differential Revision: https://reviews.llvm.org/D29171 llvm-svn: 293277
* [OpenMP] Initial implementation of OpenMP offloading library - libomptarget.George Rokos2017-01-252-0/+2557
This is the patch upstreaming the device-agnostic part of libomptarget. Differential Revision: https://reviews.llvm.org/D14031 llvm-svn: 293094
OpenPOWER on IntegriCloud