- Aug 24, 2016
-
-
Samuel Antao authored
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 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@279634 91177308-0d34-0410-b5e6-96231b3b80d8
-
Samuel Antao authored
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 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@279632 91177308-0d34-0410-b5e6-96231b3b80d8
-
Douglas Yung authored
when compiling with optimization when PS4 is the target. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@279603 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Aug 23, 2016
-
-
Nico Weber authored
/Brepro means we want reproducible builds, i.e. we _don't_ want the timestamp that's needed to be compatible with the incremental linker. https://reviews.llvm.org/D23805 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@279555 91177308-0d34-0410-b5e6-96231b3b80d8
-
Tim Northover authored
iOS (and other 32-bit ARM variants) always require a valid frame pointer to improve backtraces. Previously the -fomit-frame-pointer and -momit-leaf-frame-pointer options were being silently discarded via hacks in the backend. It's better if Clang configures itself to emit the correct IR and warns about (ignored) attempts to override this. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@279546 91177308-0d34-0410-b5e6-96231b3b80d8
-
Nico Weber authored
clang already treats all inputs as utf-8. Warn if anything but utf-8 is passed. Do this by mapping source-charset to finput-charset, which already behaves like this. Slightly tweak finput-charset to accept "utf-8" case-insensitively. This matches gcc's and cl.exe's behavior, and IANA says that character set names are case-insensitive. https://reviews.llvm.org/D23807 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@279531 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Aug 22, 2016
-
-
Artem Belevich authored
If they are, we end up with the last intermediary output preserved in the current directory after compilation. Added a test case to verify that we're using appropriate filenames for outputs of different phases. Differential Revision: https://reviews.llvm.org/D23526 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@279455 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Aug 18, 2016
-
-
Manman Ren authored
In this mode, there is no need to load any module map and the programmer can simply use "@import" syntax to load the module directly from a prebuilt module path. When loading from prebuilt module path, we don't support rebuilding of the module files and we ignore compatible configuration mismatches. rdar://27290316 Differential Revision: http://reviews.llvm.org/D23125 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@279096 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Aug 16, 2016
-
-
Samuel Antao authored
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@278811 91177308-0d34-0410-b5e6-96231b3b80d8
-
Samuel Antao authored
Unless we overload the default gcc toolchain with an empty string the system root used in the tests will be ignored if the user builds clang with a custom gcc toolchain. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@278806 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Aug 15, 2016
-
-
Justin Lebar authored
Summary: There's no point to --cuda-path if we then go and include /usr/include first. And if you install the right packages, Ubuntu will install (very old) CUDA headers there. Reviewers: tra Subscribers: cfe-commits, Prazek Differential Revision: https://reviews.llvm.org/D23341 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@278734 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Aug 12, 2016
-
-
Jonas Hahnfeld authored
Reported by Ismail Donmez! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@278497 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Aug 11, 2016
-
-
Ed Schouten authored
We're only going to provide support for using PIE on architectures that provide PC-relative addressing. i686 is not one of those, so add the necessary bits for only passing in -pie -zrelro conditionally. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@278395 91177308-0d34-0410-b5e6-96231b3b80d8
-
Ed Schouten authored
On Linux we pass in -fomit-frame-pointer flags (and similar) automatically if optimization is enabled. Let's do the same thing on CloudABI. Without this, Clang seems to run out of registers quite quickly while trying to build code with inline assembly. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@278393 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Aug 09, 2016
-
-
Yaxun Liu authored
Let the driver pass the option to frontend. Do not set precision metadata for division instructions when this option is set. Set function attribute "correctly-rounded-divide-sqrt-fp-math" based on this option. Differential Revision: https://reviews.llvm.org/D22940 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@278155 91177308-0d34-0410-b5e6-96231b3b80d8
-
Benjamin Kramer authored
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@278148 91177308-0d34-0410-b5e6-96231b3b80d8
-
Samuel Antao authored
Summary: Add test to detect the C++ include paths are passed to both CUDA host and device frontends. Reviewers: tra Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D22946 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@278140 91177308-0d34-0410-b5e6-96231b3b80d8
-
Reid Kleckner authored
It's surprising that you have to pass /Z7 in addition to -gcodeview to get debug info. The sanitizer runtime, for example, expects that if the compiler supports the -gline-tables-only flag, then it will emit debug info. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@278139 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Aug 08, 2016
-
-
Oliver Stannard authored
This patch (with the corresponding ARM backend patch) adds support for some new relocation models: * Read-only position independence (ROPI): Code and read-only data is accessed PC-relative. The offsets between all code and RO data sections are known at static link time. * Read-write position independence (RWPI): Read-write data is accessed relative to a static base register. The offsets between all writeable data sections are known at static link time. These two modes are independent (they specify how different objects should be addressed), so they can be used individually or together. These modes are intended for bare-metal systems or systems with small real-time operating systems. They are designed to avoid the need for a dynamic linker, the only initialisation required is setting the static base register to an appropriate value for RWPI code. There is one C construct not currently supported by these modes: global variables initialised to the address of another global variable or function, where that address is not known at static-link time. There are a few possible ways to solve this: * Disallow this, and require the user to write their own initialisation function if they need variables like this. * Emit dynamic initialisers for these variables in the compiler, called from the .init_array section (as is currently done for C++ dynamic initialisers). We have a patch to do this, described in my original RFC email (http://lists.llvm.org/pipermail/llvm-dev/2015-December/093022.html), but the feedback from that RFC thread was that this is not something that belongs in clang. * Use a small dynamic loader to fix up these variables, by adding the difference between the load and execution address of the relevant section. This would require linker co-operation to generate a table of addresses that need fixing up. Differential Revision: https://reviews.llvm.org/D23196 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@278016 91177308-0d34-0410-b5e6-96231b3b80d8
-
Diana Picus authored
Bug 1: triples like armv7-pc-linux-musl use the wrong linker name ld-musl-armv7.so.1; the right name should be ld-musl-arm.so.1, disregarding the subarch field. Bug 2: when compiler option -mhard-float is used, we should use the "hardfloat" linker, no matter whether the triple itself mentions "hardfloat". Patch by Lei Zhang! Differential Revision: https://reviews.llvm.org/D22904 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@277985 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Aug 03, 2016
-
-
Artem Belevich authored
Fixes test failures after r277542 on systems that don't have CUDA installed. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@277552 91177308-0d34-0410-b5e6-96231b3b80d8
-
Artem Belevich authored
This makes clang's libdevice selection match that of NVCC as described in http://docs.nvidia.com/cuda/libdevice-users-guide/basic-usage.html#version-selection If required libdevice variant is not found, driver now fails with an error. Differential Revision: https://reviews.llvm.org/D23037 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@277542 91177308-0d34-0410-b5e6-96231b3b80d8
-
Artem Belevich authored
Differential Revision: https://reviews.llvm.org/D23042 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@277537 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Aug 02, 2016
-
-
Diana Picus authored
These tests require x86-registered-target, but they don't force the target as x86 on the command line, which means they will be run and they might fail when building the x86 backend on another platform (such as AArch64). Fixes https://llvm.org/bugs/show_bug.cgi?id=28797 Differential Revision: https://reviews.llvm.org/D23054 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@277457 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Aug 01, 2016
-
-
Evandro Menezes authored
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@277365 91177308-0d34-0410-b5e6-96231b3b80d8
-
Yaron Keren authored
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@277334 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Jul 29, 2016
-
-
Daniel Jasper authored
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@277141 91177308-0d34-0410-b5e6-96231b3b80d8
-
Benjamin Kramer authored
This is the case on some linuxes, just force libomp so we get the desired results. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@277138 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Jul 28, 2016
-
-
Samuel Antao authored
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@276996 91177308-0d34-0410-b5e6-96231b3b80d8
-
Samuel Antao authored
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@276995 91177308-0d34-0410-b5e6-96231b3b80d8
-
Samuel Antao authored
It was causing a few bots to fail. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@276983 91177308-0d34-0410-b5e6-96231b3b80d8
-
Samuel Antao authored
Summary: This patch prevents OpenMP flags from being forwarded to CUDA device commands. That was causing the CUDA frontend to attempt to emit OpenMP code which is not supported. This fixes the bug reported in https://llvm.org/bugs/show_bug.cgi?id=28723. Reviewers: hfinkel, carlo.bertolli, arpith-jacob, kkwli0, tra, ABataev Subscribers: caomhin, cfe-commits Differential Revision: https://reviews.llvm.org/D22895 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@276979 91177308-0d34-0410-b5e6-96231b3b80d8
-
Nirav Dave authored
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@276947 91177308-0d34-0410-b5e6-96231b3b80d8
-
Samuel Antao authored
Summary: This patch aims at removing redundancy in the way include paths for the regular and offloading toolchains are appended to the arguments list in the clang tool. This was suggested by @rsmith in response to r275931. Reviewers: rsmith, tra Subscribers: rsmith, cfe-commits Differential Revision: https://reviews.llvm.org/D22518 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@276929 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Jul 27, 2016
-
-
Renato Golin authored
This makes sure that the thumb section flag gets set by the assembler. Patch by Martin Storsjö. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@276869 91177308-0d34-0410-b5e6-96231b3b80d8
-
Oliver Stannard authored
Differential Revision: https://reviews.llvm.org/D22761 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@276851 91177308-0d34-0410-b5e6-96231b3b80d8
-
Jonas Hahnfeld authored
This patch introduces a new cmake variable: CLANG_DEFAULT_RTLIB, thru which we can specify a default value for -rtlib (libgcc or compiler-rt) at build time, just like how we set the default C++ stdlib thru CLANG_DEFAULT_CXX_STDLIB. With these two options, we can configure clang to build binaries on Linux that have no runtime dependence on any gcc libs (libstdc++ or libgcc_s). Patch by Lei Zhang! Differential Revision: https://reviews.llvm.org/D22663 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@276848 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Jul 26, 2016
-
-
Manman Ren authored
With PCH+Module, sometimes compiler gives a hard error: Module file ‘<some-file path>.pcm' is out of date and needs to be rebuilt This happens when we have a pch importing a module and the module gets overwritten by another compiler instance after we build the pch (one example is that both compiler instances hash to the same pcm file but use different diagnostic options). When we try to load the pch later on, the compiler notices that the imported module is out of date (modification date, size do not match) but it can't handle this out of date pcm (i.e it does not know how to rebuild the pch). This commit introduces a new command line option so for PCH + module, we can turn on this option and if two compiler instances only differ in diagnostic options, the latter instance will not invalidate the original pcm. rdar://26675801 Differential Revision: http://reviews.llvm.org/D22773 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@276769 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Jul 23, 2016
-
-
Xinliang David Li authored
This patch enables raw profile merging for this option which is the new intended behavior. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@276484 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Jul 19, 2016
-
-
Simon Atanasyan authored
Initial patch provided by Duane Sand. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@275949 91177308-0d34-0410-b5e6-96231b3b80d8
-