Commit Graph

18 Commits

Author SHA1 Message Date
Alexey Bataev 38d46ffb86 [OPENMP][NVPTX] Add options -f[no-]openmp-cuda-force-full-runtime.
Added options -f[no-]openmp-cuda-force-full-runtime to [not] force use
of the full runtime for OpenMP offloading to CUDA devices.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@341073 91177308-0d34-0410-b5e6-96231b3b80d8
2018-08-30 14:45:24 +00:00
Matt Arsenault fef69ae4fb Rename -mlink-cuda-bitcode to -mlink-builtin-bitcode
The same semantics work for OpenCL, and probably any offload
language. Keep the old name around as an alias.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@340193 91177308-0d34-0410-b5e6-96231b3b80d8
2018-08-20 18:16:48 +00:00
Alexey Bataev f97144939f [DEBUGINFO] Disable unsupported debug info options for NVPTX target.
Summary:
Some targets support only default set of the debug options and do not
support additional debug options, like NVPTX target. Patch introduced
virtual function supportsDebugInfoOptions() that can be overloaded
by the toolchain, checks if the target supports some debug
options and emits warning when an unsupported debug option is
found.

Reviewers: echristo

Subscribers: aprantl, JDevlieghere, cfe-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@338155 91177308-0d34-0410-b5e6-96231b3b80d8
2018-07-27 19:45:14 +00:00
Alexey Bataev c16c83ef6c [NVPTX] Emit debug info in DWARF-2 by default for Cuda devices.
Summary:
NVPTX target supports debug info in DWARF-2 format. Patch adds emission
of debug info in DWARF-2 by default.

Reviewers: tra, jlebar

Subscribers: aprantl, JDevlieghere, cfe-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@330272 91177308-0d34-0410-b5e6-96231b3b80d8
2018-04-18 16:31:09 +00:00
Gheorghe-Teodor Bercea 08cdd81877 [OpenMP] Add flag for linking runtime bitcode library
Summary: This patch adds an additional flag to the OpenMP device offloading toolchain to link in the runtime library bitcode.

Reviewers: Hahnfeld, ABataev, carlo.bertolli, caomhin, grokos, hfinkel

Reviewed By: ABataev, grokos

Subscribers: jholewinski, guansong, cfe-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@327460 91177308-0d34-0410-b5e6-96231b3b80d8
2018-03-13 23:19:52 +00:00
Gheorghe-Teodor Bercea edf8cedd1b Revert revision 327438.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@327447 91177308-0d34-0410-b5e6-96231b3b80d8
2018-03-13 20:50:12 +00:00
Gheorghe-Teodor Bercea 4bf513aa22 [OpenMP] Add flag for linking runtime bitcode library
Summary: This patch adds an additional flag to the OpenMP device offloading toolchain to link in the runtime library bitcode.

Reviewers: Hahnfeld, ABataev, carlo.bertolli, caomhin, grokos, hfinkel

Reviewed By: ABataev, grokos

Subscribers: jholewinski, guansong, cfe-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@327438 91177308-0d34-0410-b5e6-96231b3b80d8
2018-03-13 19:39:19 +00:00
Jonas Hahnfeld d9219a222c Add target triples to openmp-offload-gpu.c
This might fix the failure on Green Dragon.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@318767 91177308-0d34-0410-b5e6-96231b3b80d8
2017-11-21 15:06:28 +00:00
Jonas Hahnfeld 6fc980f819 [OpenMP] Consistently use cubin extension for nvlink
This was previously done in some places, but for example not for
bundling so that single object compilation with -c failed. In
addition cubin was used for all file types during unbundling which
is incorrect for assembly files that are passed to ptxas.
Tighten up the tests so that we can't regress in that area.

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@318763 91177308-0d34-0410-b5e6-96231b3b80d8
2017-11-21 14:44:45 +00:00
Jonas Hahnfeld 52ab14f423 [OpenMP] Fix passing of -m arguments to device toolchain
AuxTriple is not set if host and device share a toolchain. Also,
removing an argument modifies the DAL which needs to be returned
for future use.
(Move tests back to offload-openmp.c as they are not related to GPUs.)

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@314329 91177308-0d34-0410-b5e6-96231b3b80d8
2017-09-27 18:12:34 +00:00
Jonas Hahnfeld 365f2311ca [OpenMP] Fix memory leak when translating arguments
Parsing the argument after -Xopenmp-target allocates memory that needs
to be freed. Associate it with the final DerivedArgList after we know
which one will be used.

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@314328 91177308-0d34-0410-b5e6-96231b3b80d8
2017-09-27 18:12:31 +00:00
Gheorghe-Teodor Bercea ad8b98899b [OpenMP] Don't throw cudalib not found error if only front-end is required.
Summary: If we only use the compiler front-end, do not throw an error about the cuda device library not being found. This allows the front-end to be run on systems where no Cuda installation is found.

Reviewers: Hahnfeld, ABataev, carlo.bertolli, caomhin, tra

Reviewed By: tra

Subscribers: hfinkel, tra, cfe-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@314217 91177308-0d34-0410-b5e6-96231b3b80d8
2017-09-26 15:36:20 +00:00
Gheorghe-Teodor Bercea 4f45cc6913 [OpenMP] Enable the existing nocudalib flag for OpenMP offloading toolchain.
Summary: Enable the -nocudalib flag for the OpenMP device offloading toolchain as well. Currently it can only be used for the CUDA toolchain.

Reviewers: Hahnfeld, ABataev, carlo.bertolli, caomhin, hfinkel, tra

Reviewed By: tra

Subscribers: hfinkel, cfe-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@314164 91177308-0d34-0410-b5e6-96231b3b80d8
2017-09-25 21:56:32 +00:00
Gheorghe-Teodor Bercea 3283b6fcfe [OpenMP] Bugfix: output file name drops the absolute path where full path is needed.
Summary: When composing the output file name, the path to the file is being dropped. The full path is required.

Reviewers: Hahnfeld, ABataev, caomhin, carlo.bertolli, hfinkel, tra

Reviewed By: tra

Subscribers: hfinkel, tra, cfe-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@314156 91177308-0d34-0410-b5e6-96231b3b80d8
2017-09-25 21:25:38 +00:00
Gheorghe-Teodor Bercea 3e8aa1c503 Revert commit with wrong message.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@314154 91177308-0d34-0410-b5e6-96231b3b80d8
2017-09-25 21:22:49 +00:00
Gheorghe-Teodor Bercea ef0495fb69 [OpenMP] Don't throw cudalib not found error if only front-end is required.
Summary: If we only use the compiler front-end, do not throw an error about the cuda device library not being found. This allows the front-end to be run on systems where no Cuda installation is found.

Reviewers: Hahnfeld, ABataev, carlo.bertolli, caomhin, tra

Reviewed By: tra

Subscribers: hfinkel, tra, cfe-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@314150 91177308-0d34-0410-b5e6-96231b3b80d8
2017-09-25 21:07:16 +00:00
Gheorghe-Teodor Bercea c5fedc7598 [OpenMP] Move failing flag tests to disabled GPU
offloading test file. This should prevent further errors
with the sanitizer.

Diff: D29660



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@310765 91177308-0d34-0410-b5e6-96231b3b80d8
2017-08-11 21:17:50 +00:00
Gheorghe-Teodor Bercea 58f82409fa [OpenMP] Enable previously successful offloading tests.
Create a separate test file to contain all tests for OpenMP
offloading to GPUs.

Make libdevice checking more robust by accounting for
the case in which no libdevice is found.

This changes are in connrection with diff: D29660



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@310718 91177308-0d34-0410-b5e6-96231b3b80d8
2017-08-11 15:46:22 +00:00