summaryrefslogtreecommitdiffstats
path: root/clang/lib/Driver/Driver.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* [OpenMP] OpenMP device offloading code generation produces a cubin file ↵Gheorghe-Teodor Bercea2017-08-081-2/+2
| | | | | | | | which is then integrated in the host binary using the host linker. Diff: D29654 llvm-svn: 310362
* Darwin's toolchain should be initialized before openmp offloadingAlex Lorenz2017-08-081-0/+6
| | | | | | | | is processed This fixes an 'openmp-offload.c' test failure introduced by r310263. llvm-svn: 310347
* Revert r310291, r310300 and r310332 because of test failure on DarwinAlex Lorenz2017-08-081-2/+2
| | | | | | | | | | | | | | | | | | | | | The commit r310291 introduced the failure. r310332 was a test fix commit and r310300 was a followup commit. I reverted these two to avoid merge conflicts when reverting. The 'openmp-offload.c' test is failing on Darwin because the following run lines: // RUN: touch %t1.o // RUN: touch %t2.o // RUN: %clang -### -no-canonical-prefixes -fopenmp=libomp -fopenmp-targets=nvptx64-nvidia-cuda -save-temps -no-canonical-prefixes %t1.o %t2.o 2>&1 \ // RUN: | FileCheck -check-prefix=CHK-TWOCUBIN %s trigger the following assertion: Driver.cpp:3418: assert(CachedResults.find(ActionTC) != CachedResults.end() && "Result does not exist??"); llvm-svn: 310345
* [OpenMP] Integrate OpenMP target region cubin into host binaryGheorghe-Teodor Bercea2017-08-071-2/+2
| | | | | | | | | | | | | | Summary: OpenMP device offloading code generation produces a cubin file which is then integrated in the host binary using the host linker. Reviewers: arpith-jacob, caomhin, carlo.bertolli, ABataev, Hahnfeld, jlebar, rnk, hfinkel, tstellar Reviewed By: hfinkel Subscribers: sfantao, rnk, rengolin, cfe-commits Differential Revision: https://reviews.llvm.org/D29654 llvm-svn: 310291
* Revert r304836.Nico Weber2017-08-031-4/+0
| | | | | | See discussion in https://reviews.llvm.org/D33900#824172 llvm-svn: 309960
* [Bash-autocompletion] Show HelpText with possible flagsYuka Takahashi2017-07-261-1/+1
| | | | | | | | | | | | | | | | | | | | | | Summary: `clang --autocomplete=-std` will show ``` -std: Language standard to compile for -std= Language standard to compile for -stdlib= C++ standard library to use ``` after this change. However, showing HelpText with completion in bash seems super tricky, so this feature will be used in other shells (fish, zsh...). Reviewers: v.g.vassilev, teemperor, ruiu Subscribers: cfe-commits, hiraditya Differential Revision: https://reviews.llvm.org/D35759 llvm-svn: 309113
* Update after LLVM change r309087George Rimar2017-07-261-1/+2
| | | | llvm-svn: 309088
* Remove Driver::UseStdLib.Nico Weber2017-07-231-3/+1
| | | | | | | | | All but one place are checking options::OPT_nostdlib instead of looking at this field, so convert that one other place to doing that as well. No behavior change. llvm-svn: 308848
* Remove Bitrig: Clang ChangesErich Keane2017-07-211-4/+0
| | | | | | | | Bitrig code has been merged back to OpenBSD, thus the OS has been abandoned. Differential Revision: https://reviews.llvm.org/D35708 llvm-svn: 308797
* [Bash-autocompletion] Add support for -W<warning> and -Wno<warning>Yuka Takahashi2017-07-161-0/+7
| | | | | | | | | | Summary: `-W[tab]` will autocomplete warnings defined in this link: https://clang.llvm.org/docs/DiagnosticsReference.html#wweak-vtables Differential Revision: https://reviews.llvm.org/D35447 llvm-svn: 308139
* [Bash-autocompletion] Auto complete cc1 options if -cc1 is specifiedYuka Takahashi2017-07-081-1/+10
| | | | | | | | | | | | | | Summary: We don't want to autocomplete flags whose Flags class has `NoDriverOption` when argv[1] is not `-cc1`. Another idea for this implementation is to make --autocomplete a cc1 option and handle it in clang Frontend, by porting --autocomplete handler from Driver to Frontend, so that we can handle Driver options and CC1 options in unified manner. Differential Revision: https://reviews.llvm.org/D34770 llvm-svn: 307479
* [OpenMP] Customize CUDA-based tool chain selectionGheorghe-Teodor Bercea2017-07-061-2/+16
| | | | | | | | | | | | | | Summary: This patch provides a generic way of selecting CUDA based tool chains as host-device pairs. Reviewers: arpith-jacob, caomhin, carlo.bertolli, ABataev, Hahnfeld, jlebar, hfinkel, tstellar Reviewed By: Hahnfeld Subscribers: rengolin, cfe-commits Differential Revision: https://reviews.llvm.org/D29658 llvm-svn: 307271
* [Driver] Actually report errors during parsing instead of stopping when ↵Benjamin Kramer2017-06-301-13/+29
| | | | | | | | | | | | | | there's an error somewhere. This is a more principled version of r303756. That change was both very brittle about the state of the Diags object going into the driver and also broke tooling in funny ways. In particular it prevented tools from capturing diagnostics properly and made the compilation database logic fail to provide arguments to the tool, falling back to scanning directories for JSON files. llvm-svn: 306822
* Add support for Ananas platformEd Schouten2017-06-251-0/+4
| | | | | | | | | | | | | | | | | Ananas is a home-brew operating system, mainly for amd64 machines. After using GCC for quite some time, it has switched to clang and never looked back - yet, having to manually patch things is annoying, so it'd be much nicer if this was in the official tree. More information: https://github.com/zhmu/ananas/ https://rink.nu/projects/ananas.html Submitted by: Rink Springer Differential Revision: https://reviews.llvm.org/D32936 llvm-svn: 306239
* Sort the autocomplete candidates before printing them out.Rui Ueyama2017-06-231-0/+7
| | | | | | | | | | Currently, autocompleted options are displayed in the same order as we wrote them in .td files. This patch sort them out in clang so that they are sorted alphabetically. This should improve usability. Differential Revision: https://reviews.llvm.org/D34557 llvm-svn: 306116
* [GSoC] Flag value completion for clangYuka Takahashi2017-06-201-1/+19
| | | | | | | | | | | | This is patch for GSoC project, bash-completion for clang. To use this on bash, please run `source clang/utils/bash-autocomplete.sh`. bash-autocomplete.sh is code for bash-completion. In this patch, Options.td was mainly changed in order to add value class in Options.inc. llvm-svn: 305805
* Add -frewrite-imports flag.Richard Smith2017-06-091-0/+2
| | | | | | | | If specified, when preprocessing, the contents of imported .pcm files will be included in preprocessed output. The resulting preprocessed file can then be compiled standalone without the module sources or .pcm files. llvm-svn: 305116
* Only print registered targets for `--version`Dimitry Andric2017-06-071-4/+4
| | | | | | | | | | | | | | | | | | | Summary: In D33900, I added printing of the registered targets in clang's `PrintVersion` function, which is not only used for `--version` output, but also for `-v` (verbose mode) and `-###`. Especially the latter seems to trip up some test cases, so it is probably better to only print the registered targets for `--version`. Reviewers: nemanjai, mehdi_amini Reviewed By: nemanjai Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D33981 llvm-svn: 304899
* Print registered targets in clang's version informationDimitry Andric2017-06-061-0/+5
| | | | | | | | | | | | | | | | | | | | | Summary: Other llvm tools display their registered targets when showing version information, but for some reason clang has never done this. To support this, D33899 adds the llvm parts, which make it possible to print version information to arbitrary raw_ostreams. This change adds a call to printRegisteredTargetsForVersion in clang's PrintVersion, and adds a raw_ostream parameter to two other PrintVersion functions. Reviewers: beanz, chandlerc, dberris, mehdi_amini, zturner Reviewed By: mehdi_amini Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D33900 llvm-svn: 304836
* Don't defer to the GCC driver for linking arm-baremetalJonathan Roelofs2017-05-251-0/+3
| | | | | | | | | | | | | | | Also comes with a cmake cache for building the runtime bits: $ cmake <normal cmake flags> \ -DBAREMETAL_ARMV6M_SYSROOT=/path/to/sysroot \ -DBAREMETAL_ARMV7M_SYSROOT=/path/to/sysroot \ -DBAREMETAL_ARMV7EM_SYSROOT=/path/to/sysroot \ -C /path/to/clang/cmake/caches/BaremetalARM.cmake \ /path/to/llvm https://reviews.llvm.org/D33259 llvm-svn: 303873
* Driver must return non-zero code on errors in command lineSerge Pavlov2017-05-241-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is recommit of r302775, reverted in r302777 due to a fail in clang-tidy. Original mesage is below. Now if clang driver is given wrong arguments, in some cases it continues execution and returns zero code. This change fixes this behavior. The fix revealed some errors in clang test set. File test/Driver/gfortran.f90 added in r118203 checks forwarding gfortran flags to GCC. Now driver reports error on this file, because the option -working-directory implemented in clang differs from the option with the same name implemented in gfortran, in clang the option requires argument, in gfortran does not. In the file test/Driver/arm-darwin-builtin.c clang is called with options -fbuiltin-strcat and -fbuiltin-strcpy. These option were removed in r191435 and now clang reports error on this test. File arm-default-build-attributes.s uses option -verify, which is not supported by driver, it is cc1 option. Similarly, the file split-debug.h uses options -fmodules-embed-all-files and -fmodule-format=obj, which are not supported by driver. Other revealed errors are mainly mistypes. Differential Revision: https://reviews.llvm.org/D33013 llvm-svn: 303756
* [GSoC] Shell autocompletion for clangYuka Takahashi2017-05-231-0/+7
| | | | | | | | | | | | | | | | | Summary: This is a first patch for GSoC project, bash-completion for clang. To use this on bash, please run `source clang/utils/bash-autocomplete.sh`. bash-autocomplete.sh is code for bash-completion. Simple flag completion and path completion is available in this patch. Reviewers: teemperor, v.g.vassilev, ruiu, Bigcheese, efriedma Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D33237 llvm-svn: 303670
* Reverted r302775Serge Pavlov2017-05-111-2/+0
| | | | llvm-svn: 302777
* Driver must return non-zero code on errors in command lineSerge Pavlov2017-05-111-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Now if clang driver is given wrong arguments, in some cases it continues execution and returns zero code. This change fixes this behavior. The fix revealed some errors in clang test set. File test/Driver/gfortran.f90 added in r118203 checks forwarding gfortran flags to GCC. Now driver reports error on this file, because the option -working-directory implemented in clang differs from the option with the same name implemented in gfortran, in clang the option requires argument, in gfortran does not. In the file test/Driver/arm-darwin-builtin.c clang is called with options -fbuiltin-strcat and -fbuiltin-strcpy. These option were removed in r191435 and now clang reports error on this test. File arm-default-build-attributes.s uses option -verify, which is not supported by driver, it is cc1 option. Similarly, the file split-debug.h uses options -fmodules-embed-all-files and -fmodule-format=obj, which are not supported by driver. Other revealed errors are mainly mistypes. Differential Revision: https://reviews.llvm.org/D33013 llvm-svn: 302775
* [Driver] Add compiler option to generate a reproducerBruno Cardoso Lopes2017-04-121-1/+4
| | | | | | | | | | | | | | | | | | | | | One way to currently test the reproducers is to setup "FORCE_CLANG_DIAGNOSTICS_CRASH=1" before invoking clang. This simulates a crash and produces the same contents needed by the reproducers. The reproducers are specially useful when triaging Modules issues, not only on crashes, but also for reproducing misleading warnings, errors, etc. Add a '-gen-reproducer' driver option to clang (or any similar name) and give users a flag option. Note that clang already has a -fno-crash-diagnostics, which disables the crash reproducers. I've decided not to propose "-fcrash-diagnostics" since it doesn't convey the ideia of reproduction despite a crash. rdar://problem/24114619 Differential Revision: https://reviews.llvm.org/D27604 llvm-svn: 300109
* [Driver] Print a newline when invoking `-print-resource-dir`Meador Inge2017-04-051-1/+1
| | | | | | | | | The commit yesterday (r299473) to add the `-print-resource-dir` option was supposed to emit a newline after the resource dir. Differential Revision: https://reviews.llvm.org/D31447 llvm-svn: 299597
* [Driver] Add option to print the resource directoryMeador Inge2017-04-041-0/+5
| | | | | | | | | | | | This patch adds the option -print-resource-dir. It simply prints the resource directory. This information will eventually be used in compiler-rt to setup COMPILER_RT_LIBRARY_INSTALL_DIR. Patch by Catherine Moore! Differential Revision: https://reviews.llvm.org/D31447 llvm-svn: 299473
* Driver/ToolChains: Mips -> MipsLinuxKonstantin Zhuravlyov2017-03-081-1/+1
| | | | | | | | | - Mips is architecture, not a toolchain - Might help eliminate the confusion in the future by not having header files with the same name Differential Revision: https://reviews.llvm.org/D30753 llvm-svn: 297312
* [Driver] Consolidate tools and toolchains by target platform. (NFC)David L. Jones2017-03-081-1/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: (This is a move-only refactoring patch. There are no functionality changes.) This patch splits apart the Clang driver's tool and toolchain implementation files. Each target platform toolchain is moved to its own file, along with the closest-related tools. Each target platform toolchain has separate headers and implementation files, so the hierarchy of classes is unchanged. There are some remaining shared free functions, mostly from Tools.cpp. Several of these move to their own architecture-specific files, similar to r296056. Some of them are only used by a single target platform; since the tools and toolchains are now together, some helpers now live in a platform-specific file. The balance are helpers related to manipulating argument lists, so they are now in a new file pair, CommonArgs.h and .cpp. I've tried to cluster the code logically, which is fairly straightforward for most of the target platforms and shared architectures. I think I've made reasonable choices for these, as well as the various shared helpers; but of course, I'm happy to hear feedback in the review. There are some particular things I don't like about this patch, but haven't been able to find a better overall solution. The first is the proliferation of files: there are several files that are tiny because the toolchain is not very different from its base (usually the Gnu tools/toolchain). I think this is mostly a reflection of the true complexity, though, so it may not be "fixable" in any reasonable sense. The second thing I don't like are the includes like "../Something.h". I've avoided this largely by clustering into the current file structure. However, a few of these includes remain, and in those cases it doesn't make sense to me to sink an existing file any deeper. Reviewers: rsmith, mehdi_amini, compnerd, rnk, javed.absar Subscribers: emaste, jfb, danalbert, srhines, dschuff, jyknight, nemanjai, nhaehnle, mgorny, cfe-commits Differential Revision: https://reviews.llvm.org/D30372 llvm-svn: 297250
* enable -flto=thin in clang-clBob Haarman2017-02-271-2/+6
| | | | | | | | | | | | | | Summary: This enables LTO to be used with the clang-cl frontend. Reviewers: rnk, hans Reviewed By: hans Subscribers: pcc, cfe-commits, mehdi_amini, Prazek Differential Revision: https://reviews.llvm.org/D30239 llvm-svn: 296373
* [driver] Pass a resource dir without the '/../' part.Argyrios Kyrtzidis2017-02-251-1/+2
| | | | | | | This get the resource dir string to match with the one from libclang (which is not adding '/../'), and allows clang to accept a modules-enabled PCH that was created by libclang. llvm-svn: 296262
* Cleanup: use range-based for rather than separate calls to begin and end.Richard Smith2017-02-181-9/+8
| | | | llvm-svn: 295524
* clang-cl: Warn about /U flags that look like filenames (PR31662)Hans Wennborg2017-01-271-0/+8
| | | | | | | | | | | | Both on Mac and Windows, it's common to have a 'Users' directory in the root of the filesystem, so one might specify a filename as '/Users/me/myfile.c'. clang-cl (as well as MSVC's cl.exe) will interpret that as invoking the '/U' option, which is probably not what the user wanted. Add a warning about this. Differential Revision: https://reviews.llvm.org/D29198 llvm-svn: 293305
* Split isUsingLTO() outside of embedBitcodeInObject() and ↵Mehdi Amini2017-01-241-1/+2
| | | | | | | | | | | | | | embedBitcodeMarkerOnly(). Summary: These accessors maps directly to the command line option. Reviewers: steven_wu Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D29065 llvm-svn: 292960
* unique_ptrify Driver::ToolChainsDavid Blaikie2017-01-131-44/+45
| | | | llvm-svn: 291938
* unique_ptrify createDriverOptTableDavid Blaikie2017-01-131-9/+7
| | | | llvm-svn: 291919
* Add AVR target and toolchain to ClangDylan McKay2017-01-051-0/+3
| | | | | | | | | | | | | | | | | Summary: Authored by Senthil Kumar Selvaraj This patch adds barebones support in Clang for the (experimental) AVR target. It uses the integrated assembler for assembly, and the GNU linker for linking, as lld doesn't know about the target yet. The DataLayout string is the same as the one in AVRTargetMachine.cpp. The alignment specs look wrong to me, as it's an 8 bit target and all types only need 8 bit alignment. Clang failed with a datalayout mismatch error when I tried to change it, so I left it that way for now. Reviewers: rsmith, dylanmckay, cfe-commits, rengolin Subscribers: rengolin, jroelofs, wdng Differential Revision: https://reviews.llvm.org/D27123 llvm-svn: 291082
* [CUDA,Driver] Added --no-cuda-gpu-arch= option.Artem Belevich2016-12-091-8/+22
| | | | | | | | | | This allows us to negate preceding --cuda-gpu-arch=X. This comes handy when user needs to override default flags set for them by the build system. Differential Revision: https://reviews.llvm.org/D27631 llvm-svn: 289287
* [CUDA] Driver changes to support CUDA compilation on MacOS.Justin Lebar2016-11-181-11/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Compiling CUDA device code requires us to know the host toolchain, because CUDA device-side compiles pull in e.g. host headers. When we only supported Linux compilation, this worked because CudaToolChain, which is responsible for device-side CUDA compilation, inherited from the Linux toolchain. But in order to support MacOS, CudaToolChain needs to take a HostToolChain pointer. Because a CUDA toolchain now requires a host TC, we no longer will create a CUDA toolchain from Driver::getToolChain -- you have to go through CreateOffloadingDeviceToolChains. I am *pretty* sure this is correct, and that previously any attempt to create a CUDA toolchain through getToolChain() would eventually have resulted in us throwing "error: unsupported use of NVPTX for host compilation". In any case hacking getToolChain to create a CUDA+host toolchain would be wrong, because a Driver can be reused for multiple compilations, potentially with different host TCs, and getToolChain will cache the result, causing us to potentially use a stale host TC. So that's the main change in this patch. In addition, we have to pull CudaInstallationDetector out of Generic_GCC and into a top-level class. It's now used by the Generic_GCC and MachO toolchains. Reviewers: tra Subscribers: rryan, hfinkel, sfantao Differential Revision: https://reviews.llvm.org/D26774 llvm-svn: 287285
* [CrashReproducer][Darwin] Suggest attaching .crash diagnostic fileBruno Cardoso Lopes2016-11-171-0/+115
| | | | | | | | | | | | | | | | | | | | | | | In addition to the preprocessed sources file and reproducer script, also point to the .crash diagnostic files on Darwin. Example: PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT: Preprocessed source(s) and associated run script(s) are located at: clang-4.0: note: diagnostic msg: /var/folders/bk/1hj20g8j4xvdj5gd25ywhd3m0000gq/T/RegAllocGreedy-238f28.cpp clang-4.0: note: diagnostic msg: /var/folders/bk/1hj20g8j4xvdj5gd25ywhd3m0000gq/T/RegAllocGreedy-238f28.cache clang-4.0: note: diagnostic msg: /var/folders/bk/1hj20g8j4xvdj5gd25ywhd3m0000gq/T/RegAllocGreedy-238f28.sh clang-4.0: note: diagnostic msg: /var/folders/bk/1hj20g8j4xvdj5gd25ywhd3m0000gq/T/RegAllocGreedy-238f28.crash When no match is found for the .crash, point the user to a directory where those can be found. Example: clang-4.0: note: diagnostic msg: Crash backtrace is located in clang-4.0: note: diagnostic msg: /Users/bruno/Library/Logs/DiagnosticReports/clang-4.0_<YYYY-MM-DD-HHMMSS>_<hostname>.crash clang-4.0: note: diagnostic msg: (choose the .crash file that corresponds to your crash) rdar://problem/27286266 llvm-svn: 287262
* Add a little endian variant of TCE.Pekka Jaaskelainen2016-11-161-0/+3
| | | | llvm-svn: 287112
* [Driver] Infer the correct option to ld64 for -fembed-bitcodeSteven Wu2016-11-161-21/+15
| | | | | | | | | | | | | | | | | | Summary: -fembed-bitcode infers -bitcode_bundle to ld64 but it is not correctly passed when using LTO. LTO is a special case of -fembed-bitcode which it doesn't require embed the bitcode in a special section in the object file but it requires linker to save that as part of the final executable. rdar://problem/29274226 Reviewers: mehdi_amini Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D26690 llvm-svn: 287084
* Rename the version of ConstructJob for multiple outputs to ↵Samuel Antao2016-11-031-1/+1
| | | | | | | | ConstructJobMultipleOutputs. It was causing trouble with the GCC bots. llvm-svn: 285925
* Fix Clang-tidy readability-redundant-string-cstr warningsMalcolm Parsons2016-11-021-5/+4
| | | | | | | | | | Reviewers: aaron.ballman, mehdi_amini, dblaikie Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D26206 llvm-svn: 285799
* [Driver][OpenMP] Add support to create jobs for unbundling actions.Samuel Antao2016-10-271-36/+104
| | | | | | | | | | | | | | | | | | | Summary: This patch adds the support to create jobs for the `OffloadBundlingAction` which will invoke the `clang-offload-bundler` tool to unbundle input files. Unlike other actions, unbundling actions have multiple outputs. Therefore, this patch adds the required changes to have a variant of `Tool::ConstructJob` with multiple outputs. The way the naming of the results is implemented is also slightly modified so that the same action can use a different offloading prefix for each use by the different offloading actions. With this patch, it is possible to compile a functional OpenMP binary with offloading support, even with separate compilation. Reviewers: echristo, tra, jlebar, ABataev, hfinkel Subscribers: mkuron, whchung, mehdi_amini, cfe-commits, Hahnfeld, andreybokhanko, arpith-jacob, carlo.bertolli, caomhin Differential Revision: https://reviews.llvm.org/D21857 llvm-svn: 285326
* [Driver][OpenMP] Update actions builder to create unbundling action when ↵Samuel Antao2016-10-271-1/+29
| | | | | | | | | | | | | | | | | necessary. Summary: Each time that offloading support is requested by the user and the input file is not a source file, an action `OffloadUnbundlingAction` is created to signal that the input file may contain bundles, so that the proper tool is then invoked to attempt to extract the components of the bundle. This patch adds the logic to create that action in offload action builder. The job creation for the new action will be proposed in a separate patch. Reviewers: echristo, tra, jlebar, ABataev, hfinkel Subscribers: whchung, mehdi_amini, cfe-commits, Hahnfeld, andreybokhanko, arpith-jacob, carlo.bertolli, caomhin Differential Revision: https://reviews.llvm.org/D21853 llvm-svn: 285324
* [Driver][OpenMP] Update actions builder to create bundling action when ↵Samuel Antao2016-10-271-4/+66
| | | | | | | | | | | | | | | | | necessary. Summary: In order to save the user from dealing with multiple output files (for host and device) while using separate compilation, a new action `OffloadBundlingAction` is used when the last phase is not linking. This action will then result in a job that uses the proposed bundling tool to create a single preprocessed/IR/ASM/Object file from multiple ones. The job creation for the new action will be proposed in a separate patch. Reviewers: echristo, tra, jlebar, ABataev, hfinkel Subscribers: whchung, mehdi_amini, cfe-commits, Hahnfeld, andreybokhanko, arpith-jacob, carlo.bertolli, caomhin Differential Revision: https://reviews.llvm.org/D21852 llvm-svn: 285323
* [Driver][OpenMP] Add logic for offloading-specific argument translation.Samuel Antao2016-10-271-3/+6
| | | | | | | | | | | | | | | Summary: This patch includes support for argument translation that is specific of a given offloading kind. Additionally, it implements the translation for OpenMP device kinds in the gcc tool chain. With this patch, it is possible to compile a functional OpenMP application with offloading capabilities with no separate compilation. Reviewers: echristo, tra, jlebar, rsmith, ABataev, hfinkel Subscribers: whchung, mehdi_amini, cfe-commits, Hahnfeld, andreybokhanko, arpith-jacob, carlo.bertolli, caomhin Differential Revision: https://reviews.llvm.org/D21848 llvm-svn: 285320
* [Driver][OpenMP] Build jobs for OpenMP offloading actions for targets using ↵Samuel Antao2016-10-271-6/+10
| | | | | | | | | | | | | | | | | gcc tool chains. Summary: This patch adds logic to create jobs for OpenMP offloading actions by: - tuning the jobs result information to use the offloading prefix even for (device) linking actions. - replacing the device inputs of the host linking jobs by a linker script that embed them in the right sections. Reviewers: echristo, tra, jlebar, rsmith, ABataev, hfinkel Subscribers: mkuron, whchung, mehdi_amini, cfe-commits, Hahnfeld, andreybokhanko, arpith-jacob, carlo.bertolli, caomhin Differential Revision: https://reviews.llvm.org/D21847 llvm-svn: 285319
* [Driver][OpenMP] Add specialized action builder for OpenMP offloading actions.Samuel Antao2016-10-271-6/+123
| | | | | | | | | | | | | | | | | Summary: This patch adds a new specialized action builder to create OpenMP offloading actions. The specialized builder is added to the action builder already containing the CUDA specialized builder. OpenMP offloading dependences between host and device actions (expressed with OffloadActions) are different that what is used for CUDA: - Device compile action depends on the host compile action - the device frontend extracts the information about the declarations that have to be emitted by looking into the metadata produced by the host frontend. - The host link action depends on the device link actions - the device images are embedded in the host binary at link time. Reviewers: echristo, tra, rsmith, jlebar, ABataev, hfinkel Subscribers: mkuron, whchung, mehdi_amini, cfe-commits, Hahnfeld, andreybokhanko, arpith-jacob, carlo.bertolli, caomhin Differential Revision: https://reviews.llvm.org/D21845 llvm-svn: 285314
OpenPOWER on IntegriCloud