summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* [ELF] - Do not hang if broken object has option descriptor in .MIPS.options ↵George Rimar2016-10-043-0/+7
| | | | | | | | | | | with size of zero. Previously lld would hang in infinite loop in this case, patch fixes the issue. Object was found during AFL run. Differential revision: https://reviews.llvm.org/D25229 llvm-svn: 283208
* Do not find friend function definitions inside non-instantiated class.Serge Pavlov2016-10-046-7/+249
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously if a file-level function was defined inside befriending template class, it always was treated as defined. For instance, the code like: ``` int func(int x); template<typename T> class C1 { friend int func(int x) { return x; } }; template<typename T> class C2 { friend int func(int x) { return x; } }; ``` could not be compiled due to function redefinition, although not of the templates is instantiated. Moreover, the body of friend function can contain use of template parameters, attempt to get definition of such function outside any instantiation causes compiler abnormal termination. Other compilers (gcc, icc) follow viewpoint that the body of the function defined in friend declaration becomes available when corresponding class is instantiated. This patch implements this viewpoint in clang. Definitions introduced by friend declarations in template classes are not added to the redeclaration chain of corresponding function. Only when the template is instantiated, instantiation of the function definition is placed to the chain. The fix was made in collaboration with Richard Smith. This change fixes PR8035, PR17923, PR22307 and PR25848. Differential Revision: http://reviews.llvm.org/D16989 llvm-svn: 283207
* Minor cleanups in clang-format.el.Manuel Klimek2016-10-041-41/+48
| | | | | | | | | | | | | | | | | | - Enable lexical binding - Formatting - Enable file name completion for the clang-format-executable variable - Add a missing docstring - When available, use bufferpos-to-filepos and filepos-to-bufferpos. These functions given more precise mapping than byte-to-position and position-bytes. - Rename arguments of clang-format-region to match the docstring - Instead of binding local variables to nil and then assigning them, bind them directly to their values - Make use of the fact that insert-file-contents returns the number of characters it inserted - Use cl-destructuring-bind to make the code a bit shorter - Use standard iteration (dolist) instead of mapc with a lambda, which is more common and shorter - Remove a message that was most likely only present for debugging purposes Patch by Philipp Stephani. llvm-svn: 283206
* Fix windows builtbot error.Haojian Wu2016-10-041-0/+2
| | | | llvm-svn: 283205
* [Object/ELF] - Do not crash on invalid sh_offset value of REL[A] section.George Rimar2016-10-044-0/+10
| | | | | | | | | Previously code would access invalid memory and may crash, patch fixes the issue. Differential revision: https://reviews.llvm.org/D25187 llvm-svn: 283204
* [SelectionDAG] Fix calling convention in expansion of ?MULO.whitequark2016-10-041-2/+12
| | | | | | | | | | | | | | | | | | | | | The SMULO/UMULO DAG nodes, when not directly supported by the target, expand to a multiplication twice as wide. In case that the resulting type is not legal, an __mul?i3 intrinsic is used. Since the type is not legal, the legalizer cannot directly call the intrinsic with the wide arguments; instead, it "pre-lowers" them by splitting them in halves. The "pre-lowering" code in essence made assumptions about the calling convention, specifically that i(N*2) values will be split into two iN values and passed in consecutive registers in little-endian order. This, naturally, breaks on a big-endian system, such as our OR1K out-of-tree backend. Thanks to James Miller <james@aatch.net> for help in debugging. Differential Revision: https://reviews.llvm.org/D25223 llvm-svn: 283203
* [clang-move] Make it support both relative and absolute file path arguments.Haojian Wu2016-10-049-40/+208
| | | | | | | | | | Reviewers: ioeric Subscribers: beanz, mgorny, cfe-commits Differential Revision: https://reviews.llvm.org/D24922 llvm-svn: 283202
* [ELF] - Do not crash on invalid symbol index.George Rimar2016-10-043-0/+12
| | | | | | | | | | | | | | Relative to PR30540. If .symtab has invalid type in elf, no bodies are created and any relocation that tries to access them will fail. The same can happen if symbol index is just incorrect. This was revealed by "id_000005,sig_11,src_000000,op_flip2,pos_420" Differential revision: https://reviews.llvm.org/D25025 llvm-svn: 283201
* [ELF] Set max page size to 64K for AArch64Eugene Leviant2016-10-0422-315/+314
| | | | | | Differential revision: https://reviews.llvm.org/D25079 llvm-svn: 283200
* Revert "[XRay] Check in Clang whether XRay supports the target when ↵Dean Michael Berris2016-10-042-17/+1
| | | | | | | | -fxray-instrument is passed" This reverts 283193 -- broke the build. llvm-svn: 283199
* [ELF] - Do not crash if symbol type set to TLS when there is no tls sections.George Rimar2016-10-043-1/+10
| | | | | | | | | | | | id_000021,sig_11,src_000002,op_flip1,pos_92 from PR30540 does not have TLS sections, but type of one of the symbol is broken and set to STT_TLS, what resulted in a crash. Patch fixes crash. DIfferential revision: https://reviews.llvm.org/D25083 llvm-svn: 283198
* [ELF] - Do not crash if common symbol has alignment 0.George Rimar2016-10-043-0/+9
| | | | | | | | | Testcase contains a common symbol with zero alignment, previously lld would crash, patch fixes that. Differential revision: https://reviews.llvm.org/D25085 llvm-svn: 283197
* [Object/ELF] - Avoid possible crash in getExtendedSymbolTableIndex().George Rimar2016-10-043-1/+6
| | | | | | | | | | When using broken input object found using AFL, getExtendedSymbolTableIndex() crashed because ShndxTable was empty as object does not contain SHT_SYMTAB_SHNDX section. Differential revision: https://reviews.llvm.org/D25189 llvm-svn: 283196
* Revert r283106, "Wdocumentation fix"NAKAMURA Takumi2016-10-041-1/+1
| | | | | | It should depend on r283094 and r283182. llvm-svn: 283195
* [ELF][MIPS] Do not accept non-zero GP0 value for relocatable object onlySimon Atanasyan2016-10-042-14/+17
| | | | | | | | | Follow-up to r282716. Reject input files with non-zero GP0 value only in case of relocatable object generation. In other case we can handle arbitrary GP0 value so it does not have a sense to make the restriction so wide. llvm-svn: 283194
* [XRay] Check in Clang whether XRay supports the target when ↵Dean Michael Berris2016-10-042-1/+17
| | | | | | | | | | | | | | | | | | -fxray-instrument is passed Added the code which explicitly emits an error in Clang in case `-fxray-instrument` is passed, but XRay is not supported for the selected target. Author: rSerge Reviewers: dberris, rsmith, aaron.ballman, rnk Subscribers: cfe-commits, iid_iunknown Differential Revision: https://reviews.llvm.org/D24799 llvm-svn: 283193
* Consistent fp denormal mode names. NFC.Sjoerd Meijer2016-10-044-13/+13
| | | | | | | | | This fixes the inconsistency of the fp denormal option names: in LLVM this was DenormalType, but in Clang this is DenormalMode which seems better. Differential Revision: https://reviews.llvm.org/D24906 llvm-svn: 283192
* Fix a test case failure on Apple PPC.Nemanja Ivanovic2016-10-041-4/+4
| | | | llvm-svn: 283191
* [Power9] Part-word VSX integer scalar loads/stores and sign extend instructionsNemanja Ivanovic2016-10-0433-395/+1889
| | | | | | | | | | | | | | | | | | This patch corresponds to review: https://reviews.llvm.org/D23155 This patch removes the VSHRC register class (based on D20310) and adds exploitation of the Power9 sub-word integer loads into VSX registers as well as vector sign extensions. The new instructions are useful for a few purposes: Int to Fp conversions of 1 or 2-byte values loaded from memory Building vectors of 1 or 2-byte integers with values loaded from memory Storing individual 1 or 2-byte elements from integer vectors This patch implements all of those uses. llvm-svn: 283190
* [cmake] Reintroduce (ldconfig-compatible) SOVERSIONs on shared librariesMichal Gorny2016-10-041-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Reintroduce versioning of shared libraries via SOVERSION, addressing the issues with the previous design, since Gentoo is relying on shared-split install of LLVM. The SOVERSIONs were originally introduced in r229720 for all libraries, and removed in r252093 in favor of custom SONAME. As far as I understand, the major concern with the old versioning was that the used versions were incompatible with ldconfig. Having considered that, this commit introduce SOVERSIONS with the following considerations: 1. SOVERSIONs are formed of major & minor version concatenated -- i.e. for 4.0 its .so.40. This matches the common practice where the first version number indicates ABI breakage, and therefore fixes the issues with ldconfig. Additionally, VERSION with the remaining verion components appended is used, however this is not strictly necessary. 2. The versioning is only applied to libraries with no explicit SONAME specified -- i.e. it won't apply to libLLVM but only to the split libraries. It will also apply to libraries installed by the subprojects. 3. The versioning is only done on *nix systems, Darwin excluded. This matches the current use of SONAME. Differential Revision: https://reviews.llvm.org/D24757 llvm-svn: 283189
* [cmake] Use separate doctrees to prevent races between Sphinx instancesMichal Gorny2016-10-041-1/+1
| | | | | | | | | | | | Use separate doctrees between different Sphinx builders in order to prevent race condition issues due to multiple Sphinx instances accessing the same doctree cache in parallel. Bug: https://llvm.org/bugs/show_bug.cgi?id=23781 Differential Revision: https://reviews.llvm.org/D23755 llvm-svn: 283188
* [libFuzzer] remove dfsan support and some related stale code. This is not ↵Kostya Serebryany2016-10-049-449/+1
| | | | | | being used and as is is pretty weak anyway llvm-svn: 283187
* Finish adding the individual instruction tests to the x86 unwinderJason Molenda2016-10-044-8/+725
| | | | | | | | | | | | | unittests. If I have time, I'd like to see if I can write some tests of the eh_frame augmentation which is a wholly separate code path (it seems like maybe it should be rolled into the main instruction scanning codepath, to be honest, and operate on the generated UnwindPlan instead of bothering with raw instructions at all). Outside the eh_frame augmentation, I'm comfortable that this unwind generator is being tested well now. llvm-svn: 283186
* [sanitizer-coverage] remove stale code, second attempt after failed r282994Kostya Serebryany2016-10-044-83/+0
| | | | llvm-svn: 283185
* [X86] Add MOV8rm_NOREX to switch in isReallyTriviallyReMaterializable to ↵Craig Topper2016-10-041-0/+1
| | | | | | match MOV8rm. llvm-svn: 283184
* Revert "[sanitizer-coverage] remove stale code" at it breaks Windows bot.Vitaly Buka2016-10-042-0/+73
| | | | | | This reverts commit r282994. llvm-svn: 283183
* Revert "[analyzer] Improve CloneChecker diagnostics" as its depends on ↵Vitaly Buka2016-10-0414-291/+92
| | | | | | | | reverted r283092 This reverts commit r283094. llvm-svn: 283182
* Revert "[analyzer] Add extra notes to ObjCDeallocChecker" as its depends on ↵Vitaly Buka2016-10-044-116/+12
| | | | | | | | reverted r283092 This reverts commit r283093. llvm-svn: 283181
* Revert "[analyzer] Extend bug reports with extra notes" to fix Windows bot.Vitaly Buka2016-10-0410-232/+58
| | | | | | This reverts commit r283092. llvm-svn: 283180
* Revert "[analyzer] A blind attempt to fix a buildbot" as it does not help.Vitaly Buka2016-10-041-1/+1
| | | | | | This reverts commit r283141. llvm-svn: 283179
* [libFuzzer] change the probabilities so that we choose only the inputs that ↵Kostya Serebryany2016-10-042-4/+13
| | | | | | are known to be minimal inputs for at least one coverage feature (works only with -shrink=1 for now) llvm-svn: 283178
* AMDGPU: Refactor indirect vector loweringMatt Arsenault2016-10-041-36/+42
| | | | | | | Allow inserting multiple instructions in the expanded loop. llvm-svn: 283177
* Fix TestNestedAliases.pyZachary Turner2016-10-041-5/+6
| | | | | | I missed an if/else branch when doing the conversion. llvm-svn: 283176
* AMDGPU: Factor SGPR spilling into separate functionsMatt Arsenault2016-10-042-129/+166
| | | | llvm-svn: 283175
* Remove unused parameter.Rui Ueyama2016-10-041-3/+3
| | | | | | | | | I do not fully understand how to use these classes yet, but seems like these arguments are not used, since without them all tests still pass. In order to simplify the situation, I'll remove them now. llvm-svn: 283174
* Early return. NFC.Rui Ueyama2016-10-041-5/+6
| | | | llvm-svn: 283173
* Revert "Codegen: Tail-duplicate during placement."Kyle Butt2016-10-0421-613/+93
| | | | | | | | This reverts commit ff234efbe23528e4f4c80c78057b920a51f434b2. Causing crashes on aarch64 build. llvm-svn: 283172
* Fix test when using remote debugging.Pavel Labath2016-10-041-1/+1
| | | | | | | | | | | | | | Summary: Use os.getcwd() instead of get_process_working_directory() as prefix for souce file. Reviewers: labath Subscribers: lldb-commits Differential Revision: https://reviews.llvm.org/D25217 llvm-svn: 283171
* [coroutines] Switch to using std::experimental namespace per P0057R5Gor Nishanov2016-10-046-27/+63
| | | | | | | | | | | | | | Summary: Look for coroutine_traits and friends in std::experimental namespace. Patch (mostly) by EricWF. Reviewers: cfe-commits, EricWF, rsmith Subscribers: majnemer, mehdi_amini Differential Revision: https://reviews.llvm.org/D25068 llvm-svn: 283170
* [lit] Remove workaround for Python 2.5Brian Gesiak2016-10-041-8/+1
| | | | | | | | | | | | | | Summary: The minimum version of Python necessary to run the LLVM test suite is 2.7. Code to work around Python 2.5 and lower isn't necessary. Reviewers: ddunbar, echristo, delcypher, beanz Subscribers: llvm-commits, mehdi_amini Differential Revision: https://reviews.llvm.org/D25209 llvm-svn: 283169
* Try to fix failing tests when running remote test suite.Zachary Turner2016-10-041-1/+1
| | | | llvm-svn: 283168
* Fix the data formatter for std::multiset in libc++ - this is a trivial ↵Enrico Granata2016-10-041-25/+45
| | | | | | | | amount of extra change on top of multimap Also, proper formatting.. llvm-svn: 283167
* Support configurable path to LLVM srcVitaly Buka2016-10-041-4/+3
| | | | llvm-svn: 283166
* Make GlobalsAA ignore dead constant expressions.Eli Friedman2016-10-042-0/+56
| | | | | | | | | Slightly improves the precision of GlobalsAA in certain situations, and makes the behavior of optimization passes more predictable. Differential Revision: https://reviews.llvm.org/D24104 llvm-svn: 283165
* Codegen: Tail-duplicate during placement.Kyle Butt2016-10-0421-93/+613
| | | | | | | | | | | | | | | | | | | | | The tail duplication pass uses an assumed layout when making duplication decisions. This is fine, but passes up duplication opportunities that may arise when blocks are outlined. Because we want the updated CFG to affect subsequent placement decisions, this change must occur during placement. In order to achieve this goal, TailDuplicationPass is split into a utility class, TailDuplicator, and the pass itself. The pass delegates nearly everything to the TailDuplicator object, except for looping over the blocks in a function. This allows the same code to be used for tail duplication in both places. This change, in concert with outlining optional branches, allows triangle shaped code to perform much better, esepecially when the taken/untaken branches are correlated, as it creates a second spine when the tests are small enough. llvm-svn: 283164
* Mark a couple more Issaquah issues as done: 2578 and 2738Marshall Clow2016-10-031-4/+4
| | | | llvm-svn: 283163
* Change a couple of 'template <typename's to 'template <class' which is what ↵Marshall Clow2016-10-031-3/+3
| | | | | | we use in the rest of the library. llvm-svn: 283162
* Add tests to make sure that is_constructible<cv-void> is false. We already ↵Marshall Clow2016-10-031-0/+3
| | | | | | checked 'unqualified void'. This was brought up by LWG#2738 llvm-svn: 283161
* Changes to the std::multimap formatter to make it work against trunk libc++ Enrico Granata2016-10-031-10/+50
| | | | | | Fixes rdar://28237486 llvm-svn: 283160
* Modernize some code related to Args usage / implementation.Zachary Turner2016-10-034-225/+206
| | | | | | | Mostly this involves simplifying some logical constructs and using some ranges instead of index-based iteration. NFC llvm-svn: 283159
OpenPOWER on IntegriCloud