- 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
-
Vedant Kumar authored
Patch by Alexander Shaposhnikov! Differential Revision: https://reviews.llvm.org/D23828 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@279613 91177308-0d34-0410-b5e6-96231b3b80d8
-
Adam Nemet authored
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@279608 91177308-0d34-0410-b5e6-96231b3b80d8
-
Mehdi Amini authored
This diff reorders the fields and removes excessive padding. This fixes the following warning: PTHLexer.cpp:629:7: warning: Excessive padding in 'class (anonymous namespace)::PTHStatData' (14 padding bytes, where 6 is optimal). Optimal fields order: Size, ModTime, UniqueID, HasData, IsDirectory, consider reordering the fields or adding explicit padding members. Patch by: Alexander Shaposhnikov <shal1t712@gmail.com> Differential Revision: https://reviews.llvm.org/D23826 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@279607 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
-
-
Richard Smith authored
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@279571 91177308-0d34-0410-b5e6-96231b3b80d8
-
Chris Bieneman authored
Summary: Add a cmake check for sys/resource.h and replace the __has_include() check with its result, in order to make it possible to use rlimits when building with compilers not supporting __has_include() -- i.e. when bootstrapping. // Please also re-apply dfcd52eb (llvm-config.h fix) Patch by: Michał Górny Reviewers: rsmith, beanz Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D23744 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@279559 91177308-0d34-0410-b5e6-96231b3b80d8
-
Nico Weber authored
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@279558 91177308-0d34-0410-b5e6-96231b3b80d8
-
Richard Smith authored
to DiagnoseUninstantiableTemplate, teach hasVisibleDefinition to correctly determine whether a function definition is visible, and mark both the function and the template as visible when merging function template definitions to provide hasVisibleDefinition with the relevant information. The change to always pass the right declaration as the PatternDef to DiagnoseUninstantiableTemplate also caused those checks to happen before other diagnostics in InstantiateFunctionDefinition, giving worse diagnostics for the same situations, so I sunk the relevant diagnostics into DiagnoseUninstantiableTemplate. Those parts of this patch are based on changes in reviews.llvm.org/D23492 by Vassil Vassilev. This reinstates r279486, reverted in r279500, with a fix to DiagnoseUninstantiableTemplate to only mark uninstantiable explicit instantiation declarations as invalid if we actually diagnosed them. (When we trigger an explicit instantiation of a class member from an explicit instantiation declaration for the class, it's OK if there is no corresponding definition and we certainly don't want to mark the member invalid in that case.) This previously caused a build failure during bootstrap. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@279557 91177308-0d34-0410-b5e6-96231b3b80d8
-
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
-
Artem Dergachev authored
If a call expression represents a method call of a class template, and the method itself isn't templated, then the method may be considered to be a template instantiation without template specialization arguments. No longer crash when we could not find template specialization arguments. Patch by Raphael Isemann! Differential Revision: https://reviews.llvm.org/D23780 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@279529 91177308-0d34-0410-b5e6-96231b3b80d8
-
Chandler Carruth authored
Build bots seem unhappy and as Richard was leaving he asked me to revert this for him. Doing so. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@279500 91177308-0d34-0410-b5e6-96231b3b80d8
-
Adrian Prantl authored
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@279491 91177308-0d34-0410-b5e6-96231b3b80d8
-
Adrian Prantl authored
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@279490 91177308-0d34-0410-b5e6-96231b3b80d8
-
Adrian Prantl authored
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@279489 91177308-0d34-0410-b5e6-96231b3b80d8
-
Richard Smith authored
to DiagnoseUninstantiableTemplate, teach hasVisibleDefinition to correctly determine whether a function definition is visible, and mark both the function and the template as visible when merging function template definitions to provide hasVisibleDefinition with the relevant information. The change to always pass the right declaration as the PatternDef to DiagnoseUninstantiableTemplate also caused those checks to happen before other diagnostics in InstantiateFunctionDefinition, giving worse diagnostics for the same situations, so I sunk the relevant diagnostics into DiagnoseUninstantiableTemplate. Those parts of this patch are based on changes in reviews.llvm.org/D23492 by Vassil Vassilev. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@279486 91177308-0d34-0410-b5e6-96231b3b80d8
-
Adrian Prantl authored
in isDefinedInClangModule() and assume that the incomplete definition is not defined in the module. This broke the -gmodules self host recently. rdar://problem/27894367 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@279485 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Aug 22, 2016
-
-
Bruno Cardoso Lopes authored
Fix crash-on-invalid in ObjC Sema by avoiding to rebuild a message expression to a 'super' class in case the method to call does not exist (i.e. comes from another missing identifier). In this case, the typo transform is invoked upon the message expression in an attempt to solve a typo in a 'super' call parameters, but it crashes since it assumes the method to call has a valid declaration. rdar://problem/27305403 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@279481 91177308-0d34-0410-b5e6-96231b3b80d8
-
Davide Italiano authored
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@279479 91177308-0d34-0410-b5e6-96231b3b80d8
-
Tim Shen authored
This should finish the GraphTraits migration. Differential Revision: http://reviews.llvm.org/D23730 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@279475 91177308-0d34-0410-b5e6-96231b3b80d8
-
Matt Arsenault authored
Structs are currently handled as pointer + byval, which makes AMDGPU LLVM backend generate incorrect code when structs are used. This patch changes struct argument to be handled directly and without flattening, which Clover (Mesa 3D Gallium OpenCL state tracker) will be able to handle. Flattening would expand the struct to individual elements and pass each as a separate argument, which Clover can not handle. Furthermore, such expansion does not fit the OpenCL programming model which requires to explicitely specify each argument index, size and memory location. Patch by Vedran Miletić git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@279463 91177308-0d34-0410-b5e6-96231b3b80d8
-
Duncan P. N. Exon Smith authored
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@279457 91177308-0d34-0410-b5e6-96231b3b80d8
-
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
-
David Blaikie authored
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@279445 91177308-0d34-0410-b5e6-96231b3b80d8
-
David Blaikie authored
test/CodeGenCXX/debug-info-zero-length-arrays.cpp tests this functionality more comprehensively git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@279444 91177308-0d34-0410-b5e6-96231b3b80d8
-
Martin Probst authored
Before: x as{x: number} After: x as {x: number} Reviewers: djasper Subscribers: klimek, cfe-commits Differential Revision: https://reviews.llvm.org/D23761 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@279436 91177308-0d34-0410-b5e6-96231b3b80d8
-
Gabor Horvath authored
Differential Revision: https://reviews.llvm.org/D15227 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@279427 91177308-0d34-0410-b5e6-96231b3b80d8
-
Gabor Horvath authored
Also simplify the constraints generated by the checker. Differential Revision: https://reviews.llvm.org/D23112 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@279425 91177308-0d34-0410-b5e6-96231b3b80d8
-
Elad Cohen authored
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@279419 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Aug 21, 2016
-
-
Asaf Badouh authored
add "__" prefix Bug 28842 https://llvm.org/bugs/show_bug.cgi?id=29040 Differential Revision: https://reviews.llvm.org/D23753 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@279392 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Aug 20, 2016
-
-
Simon Pilgrim authored
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@279382 91177308-0d34-0410-b5e6-96231b3b80d8
-
Artem Dergachev authored
This replaces the old approach of fingerprinting every AST node into a string, which avoided collisions and was simple to implement, but turned out to be extremely ineffective with respect to both performance and memory. The collisions are now dealt with in a separate pass, which no longer causes performance problems because collisions are rare. Patch by Raphael Isemann! Differential Revision: https://reviews.llvm.org/D22515 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@279378 91177308-0d34-0410-b5e6-96231b3b80d8
-
Benjamin Kramer authored
This is valid in GNU C, which allows pointers to incomplete enums. GCC just pretends that the underlying type is 'int' in those cases, follow that behavior. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@279374 91177308-0d34-0410-b5e6-96231b3b80d8
-
Vassil Vassilev authored
In certain cases (mostly coming from modules), Sema's idea of the StdNamespace does not point to the first declaration of namespace std. Patch by Cristina Cristescu! Reviewed by Richard Smith. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@279371 91177308-0d34-0410-b5e6-96231b3b80d8
-
Artem Dergachev authored
So far macro-generated code was treated by the CloneDetector as normal code. This caused that some macros where reported as false-positive clones because large chunks of code coming from otherwise concise macro expansions were treated as copy-pasted code. This patch ensures that macros are treated in the same way as literals/function calls. This prevents macros that expand into multiple statements from being reported as clones. Patch by Raphael Isemann! Differential Revision: https://reviews.llvm.org/D23316 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@279367 91177308-0d34-0410-b5e6-96231b3b80d8
-
Artem Dergachev authored
For example, code samples `isa<Stmt>(S)' and `isa<Expr>(S)' are no longer considered to be clones. Patch by Raphael Isemann! Differential Revision: https://reviews.llvm.org/D23555 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@279366 91177308-0d34-0410-b5e6-96231b3b80d8
-
Manman Ren authored
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@279358 91177308-0d34-0410-b5e6-96231b3b80d8
-