summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* Traversing template paramter lists of DeclaratorDecls and/or TagDecls.Nico Weber2016-09-132-0/+103
| | | | | | | | | | | | | | The unit tests in this patch demonstrate the need to traverse template parameter lists of DeclaratorDecls (e.g. VarDecls, CXXMethodDecls) and TagDecls (e.g. EnumDecls, RecordDecls). Fixes PR29042. https://reviews.llvm.org/D24268 Patch from Lukasz Łukasz Anforowicz <lukasza@chromium.org>! llvm-svn: 281345
* Remove redundant comma around parenthesis in parameter list.Eric Liu2016-09-132-56/+58
| | | | | | | | | | Reviewers: djasper Subscribers: cfe-commits, klimek Differential Revision: https://reviews.llvm.org/D24501 llvm-svn: 281344
* [ConstantFold] Improve the bitcast folding logic for constant vectors.Andrea Di Biagio2016-09-133-25/+35
| | | | | | | | | | | | | | | | | | | | The constant folder didn't know how to always fold bitcasts of constant integer vectors. In particular, it was unable to handle the case where a constant vector had some undef elements, and the resulting (i.e. bitcasted) vector type had more elements than the original vector type. Example: %cast = bitcast <2 x i64><i64 undef, i64 2> to <4 x i32> On a little endian target, %cast could have been folded to: <4 x i32><i32 undef, i32 undef, i32 2, i32 0> This patch improves the folding logic by teaching how to correctly propagate undef elements in the folded vector. Differential Revision: https://reviews.llvm.org/D24301 llvm-svn: 281343
* [asan] Add missing include for rand()Jonas Hahnfeld2016-09-131-0/+1
| | | | llvm-svn: 281342
* [X86] Regenerated shift combine tests.Simon Pilgrim2016-09-131-26/+104
| | | | | | Added x86_64 tests llvm-svn: 281341
* [modules] Re-enable some previously excluded files.Vassil Vassilev2016-09-131-9/+0
| | | | | | | | Our modules support seems to be able to handle them nowadays. Patch by Cristina Cristescu! llvm-svn: 281340
* [Hexagon] Clear the flow queue after visiting a single instructionKrzysztof Parzyszek2016-09-132-0/+52
| | | | llvm-svn: 281339
* Enable merging of SHF_MERGE sections with linker scripts.Rafael Espindola2016-09-137-17/+154
| | | | | | | | | This also fixes the related problem of non SHF_MERGE sections with different flags not being merged. Fixes pr30355. llvm-svn: 281338
* Apply Clang-format to MCAsmParser.cpp NFC.Nirav Dave2016-09-131-1/+2
| | | | llvm-svn: 281337
* Defer asm errors to post-statement failureNirav Dave2016-09-1316-830/+518
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Recommitting after fixing AsmParser Initialization. Allow errors to be deferred and emitted as part of clean up to simplify and shorten Assembly parser code. This will allow error messages to be emitted in helper functions and be modified by the caller which has better context. As part of this many minor cleanups to the Parser: * Unify parser cleanup on error * Add Workaround for incorrect return values in ParseDirective instances * Tighten checks on error-signifying return values for parser functions and fix in-tree TargetParsers to be more consistent with the changes. * Fix AArch64 test cases checking for spurious error messages that are now fixed. These changes should be backwards compatible with current Target Parsers so long as the error status are correctly returned in appropriate functions. Reviewers: rnk, majnemer Subscribers: aemerson, jyknight, llvm-commits Differential Revision: https://reviews.llvm.org/D24047 llvm-svn: 281336
* [LoopInterchange] Minor refactor. NFC.Chad Rosier2016-09-131-12/+11
| | | | llvm-svn: 281334
* GPGPU: Use const_cast to avoid compiler warning [NFC]Tobias Grosser2016-09-131-1/+1
| | | | llvm-svn: 281333
* [InstSimplify] Add tests to show missed bitcast folding opportunities.Andrea Di Biagio2016-09-131-0/+144
| | | | | | | | | | InstSimplify doesn't always know how to fold a bitcast of a constant vector. In particular, the logic in InstSimplify doesn't know how to handle the case where the constant vector in input contains some undef elements, and the number of elements is smaller than the number of elements of the bitcast vector type. llvm-svn: 281332
* Don't use else if after return. Tidy comments. NFC.Chad Rosier2016-09-131-5/+3
| | | | llvm-svn: 281331
* Typo. NFC.Chad Rosier2016-09-131-3/+3
| | | | llvm-svn: 281330
* Refactor duplicated code. NFC.Rafael Espindola2016-09-131-11/+11
| | | | llvm-svn: 281329
* [LoopInterchange] Tidy up and remove unnecessary dyn_casts. NFC.Chad Rosier2016-09-131-13/+12
| | | | llvm-svn: 281328
* Revert "[ARM] Promote small global constants to constant pools"James Molloy2016-09-135-253/+1
| | | | | | This reverts commit r281314. Speculatively revert as it's possible this caused linker errors: http://lab.llvm.org:8011/builders/clang-native-arm-lnt/builds/19656 llvm-svn: 281327
* Remove InstCombine test fileSam Parker2016-09-131-17/+0
| | | | | | My previous commit should of removed a test file but I missed it. llvm-svn: 281326
* Turn createKey into a static helper. NFC.Rafael Espindola2016-09-132-20/+18
| | | | llvm-svn: 281325
* [ARM] Add ".code 32" to functions in the ARM instruction setPablo Barrio2016-09-133-3/+28
| | | | | | | | | | | | | | | | | | | Before, only Thumb functions were marked as ".code 16". These ".code x" directives are effective until the next directive of its kind is encountered. Therefore, in code with interleaved ARM and Thumb functions, it was possible to declare a function as ARM and end up with a Thumb function after assembly. A test has been added. An existing test has also been fixed to take this change into account. Reviewers: aschwaighofer, t.p.northover, jmolloy, rengolin Subscribers: aemerson, rengolin, llvm-commits Differential Revision: https://reviews.llvm.org/D24337 llvm-svn: 281324
* [Thumb] Teach ISel how to lower compares of AND bitmasks efficientlyJames Molloy2016-09-139-26/+231
| | | | | | | | | | | | | For the common pattern (CMPZ (AND x, #bitmask), #0), we can do some more efficient instruction selection if the bitmask is one consecutive sequence of set bits (32 - clz(bm) - ctz(bm) == popcount(bm)). 1) If the bitmask touches the LSB, then we can remove all the upper bits and set the flags by doing one LSLS. 2) If the bitmask touches the MSB, then we can remove all the lower bits and set the flags with one LSRS. 3) If the bitmask has popcount == 1 (only one set bit), we can shift that bit into the sign bit with one LSLS and change the condition query from NE/EQ to MI/PL (we could also implement this by shifting into the carry bit and branching on BCC/BCS). 4) Otherwise, we can emit a sequence of LSLS+LSRS to remove the upper and lower zero bits of the mask. 1-3 require only one 16-bit instruction and can elide the CMP. 4 requires two 16-bit instructions but can elide the CMP and doesn't require materializing a complex immediate, so is also a win. llvm-svn: 281323
* Enable simplify libcalls for ARM PCSSam Parker2016-09-133-3/+264
| | | | | | | | | | Teach SimplifyLibcalls that in can treat functions annotated with apcs, aapcs or aapcs_vfp like normal C functions if they only take and return integer or pointer values, and the target is not iOS. Differential Revision: https://reviews.llvm.org/D24453 llvm-svn: 281322
* [llvm-cov] - Included footer "Generated by llvm-cov -- llvm version <version ↵Ying Yi2016-09-134-10/+29
| | | | | | | | | | number>" in the coverage report. The llvm-cov version information will be useful to the user when comparing the code coverage across different versions of llvm-cov. This patch provides the llvm-cov version information in the generated coverage report. Differential Revision: https://reviews.llvm.org/D24457 llvm-svn: 281321
* Delete dead code.Rafael Espindola2016-09-131-3/+0
| | | | | | We already handle this is createSections. llvm-svn: 281320
* [ARM] Support ldr.w in pseudo instruction ldr rd,=immediatePeter Smith2016-09-133-0/+78
| | | | | | | | | | | | The changes made in r269352, r269353 and r269354 to support the transformation of the ldr rd,=immediate to mov introduced a regression from 3.8 (ldr.w rd, =immediate) not supported. This change puts support back in for ldr.w by means of a t2InstAlias for the .w form. The .w is ignored in ARM state and propagated to the ldr in Thumb2. llvm-svn: 281319
* [ELF] - Versionscript: support mangled symbols with the same name.George Rimar2016-09-133-16/+41
| | | | | | | | | | | | | | | | | This is PR30312. Info from bug page: Both of these symbols demangle to abc::abc(): _ZN3abcC1Ev _ZN3abcC2Ev (These would be abc's complete object constructor and base object constructor, respectively.) however with "abc::abc()" in the version script only one of the two receives the symbol version. Patch fixes that. It uses testcase created by Ed Maste (D24306). Differential revision: https://reviews.llvm.org/D24336 llvm-svn: 281318
* Remove MIUtilParse (no longer used)Pavel Labath2016-09-133-152/+0
| | | | | | | | | | | | | Summary: follow-up to https://reviews.llvm.org/D23882 Reviewers: dawn, krytarowski, labath, ki.stfu Subscribers: beanz, mgorny, labath, ki.stfu, lldb-commits Differential Revision: https://reviews.llvm.org/D23883 Author: Michał Górny <mgorny@gentoo.org> llvm-svn: 281317
* Revert accidentally checked in change in r281315.Vassil Vassilev2016-09-131-1/+1
| | | | llvm-svn: 281316
* Simplify. NFC.Vassil Vassilev2016-09-132-4/+4
| | | | llvm-svn: 281315
* [ARM] Promote small global constants to constant poolsJames Molloy2016-09-135-1/+253
| | | | | | | | | | | | | | | | | | | | | | | | If a constant is unamed_addr and is only used within one function, we can save on the code size and runtime cost of an indirection by changing the global's storage to inside the constant pool. For example, instead of: ldr r0, .CPI0 bl printf bx lr .CPI0: &format_string format_string: .asciz "hello, world!\n" We can emit: adr r0, .CPI0 bl printf bx lr .CPI0: .asciz "hello, world!\n" This can cause significant code size savings when many small strings are used in one function (4 bytes per string). llvm-svn: 281314
* [clang-tidy] Fix naming in container-size-empty.Kirill Bobyrev2016-09-131-4/+4
| | | | llvm-svn: 281313
* [WebAssembly] Trying to fix broken tests in CodeGen/WebAssembly caused by ↵Eric Liu2016-09-132-2/+2
| | | | | | | | | | | | r281285. Reviewers: bkramer, ddcc, dschuff, sunfish Subscribers: jfb, llvm-commits, dschuff Differential Revision: https://reviews.llvm.org/D24497 llvm-svn: 281312
* Use value directly instead of reference. NFC.Michael Kruse2016-09-131-2/+2
| | | | | | | The alias to the array element is read-only and a primitive type (pointer), therefore use the value directly instead of a reference to it. llvm-svn: 281311
* [libcxx] Fix gcc builds.Asiri Rathnayake2016-09-131-2/+13
| | | | | | | Step around a gcc pre-processor defect which causes it to fail to parse the __has_include macro check. llvm-svn: 281310
* Fix linux build after rL281273Tamas Berghammer2016-09-131-1/+1
| | | | llvm-svn: 281309
* Remove MVT:i1 xor instruction before SELECT. (Performance improvement).Ayman Musa2016-09-133-11/+69
| | | | | | Differential Revision: https://reviews.llvm.org/D23764 llvm-svn: 281308
* [clang-tidy] Extend readability-container-size-empty to arbitrary class with ↵Kirill Bobyrev2016-09-133-17/+194
| | | | | | | | | | | | | | | | | | | | | | | | | | size() and empty() This patch extends readability-container-size-empty check allowing it to produce warnings not only for STL containers, but also for containers, which provide two functions matching following signatures: * `size_type size() const;` * `bool empty() const;` Where `size_type` can be any kind of integer type. This functionality was proposed in https://llvm.org/bugs/show_bug.cgi?id=26823 by Eugene Zelenko. Approval: alexfh Reviewers: alexfh, aaron.ballman, Eugene.Zelenko Subscribers: etienneb, Prazek, hokein, xazax.hun, cfe-commits Differential Revision: https://reviews.llvm.org/D24349 llvm-svn: 281307
* Revert of r281304 as it is causing build bot failures in hexagonSjoerd Meijer2016-09-1310-64/+74
| | | | | | | hwloop regression tests. These tests pass locally; will be investigating where these differences come from. llvm-svn: 281306
* GPGPU: Allow region statementsTobias Grosser2016-09-132-1/+87
| | | | llvm-svn: 281305
* This adds a new field isAdd to MCInstrDesc. The ARM and Hexagon instructionSjoerd Meijer2016-09-1310-74/+64
| | | | | | | | | | | descriptions now tag add instructions, and the Hexagon backend is using this to identify loop induction statements. Patch by Sam Parker and Sjoerd Meijer. Differential Revision: https://reviews.llvm.org/D23601 llvm-svn: 281304
* GPGPU: Extend types when array sizes have smaller typesTobias Grosser2016-09-132-0/+67
| | | | | | This prevents a compiler crash. llvm-svn: 281303
* AVX-512: Fix for PR28175 - Scalar code optimization.Elena Demikhovsky2016-09-136-29/+105
| | | | | | | | | Optimized (truncate (assertzext x) to i1) and anyext i1 to i8/16/32. Optimization of this patterns is a one more step towards i1 optimization on AVX-512. Differential Revision: https://reviews.llvm.org/D24456 llvm-svn: 281302
* [AArch64] Support stackmap/patchpoint in getInstSizeInBytesDiana Picus2016-09-133-4/+191
| | | | | | | | | | | | | | | | | We currently return 4 for stackmaps and patchpoints, which is very optimistic and can in rare cases cause the branch relaxation pass to fail to relax certain branches. This patch causes getInstSizeInBytes to return a pessimistic estimate of the size as the number of bytes requested in the stackmap/patchpoint. In the future, we could provide a more accurate estimate by sharing some of the logic in AArch64::LowerSTACKMAP/PATCHPOINT. Fixes part of https://llvm.org/bugs/show_bug.cgi?id=28750 Differential Revision: https://reviews.llvm.org/D24073 llvm-svn: 281301
* [X86] Remove masked shufpd/shufps intrinsics and autoupgrade to native ↵Craig Topper2016-09-137-166/+144
| | | | | | vector shuffles. They were removed from clang previously but accidentally left in the backend. llvm-svn: 281300
* [X86] Remove some dead intrinsics. They aren't implemented and clang doesn't ↵Craig Topper2016-09-131-16/+0
| | | | | | reference them. llvm-svn: 281299
* Allow register variables in naked functions.Nikola Smiljanic2016-09-132-0/+33
| | | | llvm-svn: 281298
* [Docs] Fix a broken link in the Kaleidoscope tutorial.Davide Italiano2016-09-131-1/+1
| | | | | | Patch by: Alfred Perlstein <alfred@FreeBSD.org> llvm-svn: 281297
* [LTO] Only expose the dataLayout string instead of the whole module.Davide Italiano2016-09-131-4/+4
| | | | | | Differential Revision: https://reviews.llvm.org/D24494 llvm-svn: 281296
* Adapt test case to recent change in Global Variable DefinitionTobias Grosser2016-09-131-1/+1
| | | | llvm-svn: 281295
OpenPOWER on IntegriCloud