summaryrefslogtreecommitdiffstats
path: root/clang/test/Driver/clang-offload-bundler.c
Commit message (Collapse)AuthorAgeFilesLines
* Fix clang-offload-bundler test.Zachary Turner2016-10-111-1/+1
| | | | | | | A recent change to llvm::cl slightly changed the format of the help output, and it broke this test. NFC llvm-svn: 283895
* Try to fix clang-offload-bunder.c test once moreReid Kleckner2016-08-291-2/+2
| | | | llvm-svn: 279978
* Fix clang-offload-bundler.c test on WindowsReid Kleckner2016-08-251-1/+1
| | | | llvm-svn: 279772
* Fix offload bundler test to support Windows new lines.Samuel Antao2016-08-251-2/+2
| | | | llvm-svn: 279741
* Fix offload bundler tests so that diagnostic can start with caps.Samuel Antao2016-08-241-1/+1
| | | | | | Windows require that. llvm-svn: 279653
* Add target REQUIRES directives to offload bundler test. Samuel Antao2016-08-241-0/+3
| | | | llvm-svn: 279635
* [Driver][OpenMP][CUDA] Add capability to bundle object files in sections of ↵Samuel Antao2016-08-241-0/+35
| | | | | | | | | | | | | | | | | | | the host binary format. Summary: This patch adds the capability to bundle object files in sections of the host binary using a designated naming convention for these sections. This patch uses the functionality of the object reader already in the LLVM library to read bundled files, and invokes clang with the incremental linking options to create bundle files. Bundling files involves creating an IR file with the contents of the bundle assigned as initializers of globals binded to the designated sections. This way the bundling implementation is agnostic of the host object format. The features added by this patch were requested in the RFC discussion in http://lists.llvm.org/pipermail/cfe-dev/2016-February/047547.html. Reviewers: echristo, tra, jlebar, hfinkel, ABataev, Hahnfeld Subscribers: mkuron, whchung, cfe-commits, andreybokhanko, Hahnfeld, arpith-jacob, carlo.bertolli, mehdi_amini, caomhin Differential Revision: https://reviews.llvm.org/D21851 llvm-svn: 279634
* clang-offload-bundler - offload files bundling/unbundling toolSamuel Antao2016-08-241-0/+222
Summary: One of the goals of programming models that support offloading (e.g. OpenMP) is to enable users to offload with little effort, by annotating the code with a few pragmas. I'd also like to save users the trouble of changing their existent applications' build system. So having the compiler always return a single file instead of one for the host and each target even if the user is doing separate compilation is desirable. This diff proposes a tool named clang-offload-bundler (happy to change the name if required) that is used to bundle files associated with the same user source file but different targets, or to unbundle a file into separate files associated with different targets. This tool supports the driver support for OpenMP under review in http://reviews.llvm.org/D9888. The tool is used there to enable separate compilation, so that the very first action on input files that are not source files is a "unbundling action" and the very last non-linking action is a "bundling action". The format of the bundled files is currently very simple: text formats are concatenated with comments that have a magic string and target identifying triple in between, and binary formats have a header that contains the triple and the offset and size of the code for host and each target. The goal is to improve this tool in the future to deal with archive files so that each individual file in the archive is properly dealt with. We see that archives are very commonly used in current applications to combine separate compilation results. So I'm convinced users would enjoy this feature. This tool can be used like this: `clang-offload-bundler -targets=triple1,triple2 -type=ii -inputs=a.triple1.ii,a.triple2.ii -outputs=a.ii` or `clang-offload-bundler -targets=triple1,triple2 -type=ii -outputs=a.triple1.ii,a.triple2.ii -inputs=a.ii -unbundle` I implemented the tool under clang/tools. Please let me know if something like this should live somewhere else. This patch is prerequisite for http://reviews.llvm.org/D9888. Reviewers: hfinkel, rsmith, echristo, chandlerc, tra, jlebar, ABataev, Hahnfeld Subscribers: whchung, caomhin, andreybokhanko, arpith-jacob, carlo.bertolli, mehdi_amini, guansong, Hahnfeld, cfe-commits Differential Revision: https://reviews.llvm.org/D13909 llvm-svn: 279632
OpenPOWER on IntegriCloud