summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* [clang-tidy] use CHECK-NOTES in tests for bugprone-macro-repeated-side-effectsJonas Toth2018-09-251-19/+38
| | | | | | | | | | | | Reviewers: alexfh, aaron.ballman, hokein Reviewed By: alexfh Subscribers: xazax.hun, cfe-commits Differential Revision: https://reviews.llvm.org/D52230 llvm-svn: 343001
* [clang-tidy] Add modernize-concat-nested-namespaces checkJonas Toth2018-09-258-2/+378
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Finds instances of namespaces concatenated using explicit syntax, such as `namespace a { namespace b { [...] }}` and offers fix to glue it to `namespace a::b { [...] }`. Properly handles `inline` and unnamed namespaces. ~~Also, detects empty blocks in nested namespaces and offers to remove them.~~ Test with common use cases included. I ran the check against entire llvm repository. Except for expected `nested namespace definitions only available with -std=c++17 or -std=gnu++17` warnings I noticed no issues when the check was performed. Example: ``` namespace a { namespace b { void test(); }} ``` can become ``` namespace a::b { void test(); } ``` Patch by wgml! Reviewers: alexfh, aaron.ballman, hokein Reviewed By: aaron.ballman Subscribers: JonasToth, Eugene.Zelenko, lebedev.ri, mgorny, xazax.hun, cfe-commits Tags: #clang-tools-extra Differential Revision: https://reviews.llvm.org/D52136 llvm-svn: 343000
* [clangd] Merge binary + YAML serialization behind a (mostly) common interface.Sam McCall2018-09-2511-175/+174
| | | | | | | | | | | | | | | | | Summary: Interface is in one file, implementation in two as they have little in common. A couple of ad-hoc YAML functions left exposed: - symbol -> YAML I expect to keep for tools like dexp - YAML -> symbol is used for the MR-style indexer, I think we can eliminate this (merge-on-the-fly, else use a different serialization) Reviewers: kbobyrev Subscribers: mgorny, ilya-biryukov, ioeric, MaskRay, jkorous, arphaman, kadircet, cfe-commits Differential Revision: https://reviews.llvm.org/D52453 llvm-svn: 342999
* Replace boolean parameter with enum value according r342633Tatyana Krasnukha2018-09-251-2/+2
| | | | llvm-svn: 342998
* [globalisel][tblgen] Table optimization should consider the C++ code in C++ ↵Daniel Sanders2018-09-252-0/+51
| | | | | | | | predicates This fixes PR39045 llvm-svn: 342997
* [OPENMP] Fix the test, NFC.Alexey Bataev2018-09-251-3/+2
| | | | | | Fixed test to pacify buildbot. llvm-svn: 342996
* [OPENMP] Fix failed test, NFC.Alexey Bataev2018-09-251-1/+0
| | | | llvm-svn: 342995
* [ConstHoist] Do not rebase single (or few) dependent constantZhaoshi Zheng2018-09-252-22/+237
| | | | | | | | | | | If an instance (InsertionPoint or IP) of Base constant A has only one or few rebased constants depending on it, do NOT rebase. One extra ADD instruction is required to materialize each rebased constant, assuming A and the rebased have the same materialization cost. Differential Revision: https://reviews.llvm.org/D52243 llvm-svn: 342994
* Revert "[DebugInfo] Do not generate address info for removed debug labels."Justin Bogner2018-09-252-42/+4
| | | | | | | | | | The added test is failing on macOS: http://green.lab.llvm.org/green/job/clang-stage1-cmake-RA-incremental/53550/ This reverts r342943. llvm-svn: 342993
* Fix an error message. It must start with a lowercase letter.Rui Ueyama2018-09-252-2/+2
| | | | llvm-svn: 342992
* [DRIVER][OFFLOAD] Do not invoke unbundler on unsupported file types.Alexey Bataev2018-09-254-3/+20
| | | | | | | | | clang-offload-bundler should not be invoked with the unbundling action when the input file type does not match the action type. For example, .so files should be unbundled during linking phase and should be linked only with the host code. llvm-svn: 342991
* [AArch64] Support adding X[8-15,18] registers as CSRs.Tri Vo2018-09-255-0/+133
| | | | | | | | | | | | | | | | | | Summary: Making X[8-15,18] registers call-saved is used to support CONFIG_ARM64_LSE_ATOMICS in Linux kernel. Signed-off-by: Tri Vo <trong@android.com> Reviewers: srhines, nickdesaulniers, javed.absar Reviewed By: nickdesaulniers Subscribers: kristof.beyls, jfb, cfe-commits Differential Revision: https://reviews.llvm.org/D52399 llvm-svn: 342990
* [X86] Add AVX512 support to combineVectorSizedSetCCEquality.Craig Topper2018-09-252-290/+163
| | | | | | | | | | | | Reviewers: spatel, RKSimon Reviewed By: spatel Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D52424 llvm-svn: 342989
* [InstCombine] narrow binops on concatenated vectors (PR33026)Sanjay Patel2018-09-252-53/+76
| | | | | | | | | The motivating case from: https://bugs.llvm.org/show_bug.cgi?id=33026 ...has no shuffles now. This kind of pattern may occur during vectorization when targets have lumpy ISAs like SSE/AVX. llvm-svn: 342988
* [ARM] Share predecessor bookkeeping in CombineBaseUpdate. NFCI.Nirav Dave2018-09-251-2/+9
| | | | llvm-svn: 342987
* [AArch64] Share search bookkeeping in combines. NFCI.Nirav Dave2018-09-251-15/+17
| | | | | | | | Share predecessor search bookkeeping in both perform PostLD1Combine and performNEONPostLDSTCombine. This should be approximately a 4x and 2x performance improvement. llvm-svn: 342986
* [LegalizeDAG] Prune Predecessor check in ↵Nirav Dave2018-09-251-0/+1
| | | | | | ExpandExtractFromVectorThroughStack. NFCI. llvm-svn: 342985
* [DAGCombine] Improve Predecessor check in SimplifySelectOps. NFCI.Nirav Dave2018-09-251-4/+36
| | | | | | | Reuse search space bookkeeping across multiple predecessor checks qdone to avoid redundancy. This should cut search cost by ~4x. llvm-svn: 342984
* [DAGCombine] Share predecessor bookkeeping in CombineToPostIndexedLoadStore. ↵Nirav Dave2018-09-251-2/+9
| | | | | | NFCI. llvm-svn: 342983
* [llvm-exegesis] Serializes registers initial values.Guillaume Chatelet2018-09-255-21/+77
| | | | | | | | | | | | Summary: Adds the registers initial values to the YAML output of llvm-exegesis. Reviewers: courbet Subscribers: tschuett, llvm-commits Differential Revision: https://reviews.llvm.org/D52460 llvm-svn: 342982
* [llvm-exegesis] Fix missing document separator in YAML output.Guillaume Chatelet2018-09-252-1/+5
| | | | | | | | | | Reviewers: courbet Subscribers: tschuett, llvm-commits Differential Revision: https://reviews.llvm.org/D52496 llvm-svn: 342981
* [DAGCombine] Don't fold dependent loads across SELECT_CC.Nirav Dave2018-09-251-4/+5
| | | | | | | | | | | | | | | | | | DAGCombine will try to fold two loads that feed a SELECT or SELECT_CC after the select, resulting in a select of an address and a single load after. If either of the loads depend on the other, this is not legal as it could introduce cycles. However, it only checked this if the opcode was a SELECT, and not for a SELECT_CC. Unfortunately, the only reproducer I have for this is for our downstream target. I've tried getting it to trigger on an upstream one but haven't been successful. Patch thanks to Bevin Hansson. llvm-svn: 342980
* Parallelize .gdb_index string table writes.Rui Ueyama2018-09-251-1/+2
| | | | | | When we are creating a large .gdb_index, this change makes a difference. llvm-svn: 342978
* [clang-cl] Provide separate flags for all the /O variantsHans Wennborg2018-09-253-24/+51
| | | | | | | | | | | | | | | This provides better help text in "clang-cl /?". Also it cleans things up a bit: previously "/Od" could be handled either as a separate flag aliased to "-O0", or by the main optimization flag processing in TranslateOptArg. With this patch, all the flags get aliased back to /O so they're handled by TranslateOptArg. Thanks to Nico for the idea! Differential revision: https://reviews.llvm.org/D52266 llvm-svn: 342977
* [VFS] Add a proxy FS that delegates calls to underlying FS by default.Eric Liu2018-09-251-0/+36
| | | | | | | | | | | | | | Summary: This is useful when derived file systems want to override some calls and still proxy other calls. Reviewers: ilya-biryukov, sammccall Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D52462 llvm-svn: 342976
* [llvm-exegesis] Add lit tests (v2).Clement Courbet2018-09-257-14/+57
| | | | | | | | | | | | Summary: This revisits rL342953 by adding detection of host support. Reviewers: gchatelet, lebedev.ri, alexshap Subscribers: mgorny, tschuett, llvm-commits Differential Revision: https://reviews.llvm.org/D52464 llvm-svn: 342975
* [clangd] NFC: Simplify code, enforce LLVM Coding StandardsKirill Bobyrev2018-09-256-73/+73
| | | | | | | | | | | | | | | | For consistency, functional-style code pieces are replaced with their simple counterparts to improve readability. Also, file headers are fixed to comply with LLVM Coding Standards. `static` member of anonymous namespace is not marked `static` anymore, because it is redundant. Reviewed By: sammccall Differential Revision: https://reviews.llvm.org/D52466 llvm-svn: 342974
* [AST] Squeeze some bits in LinkageComputer::QueryTypeBruno Ricci2018-09-251-3/+8
| | | | | | | | | | | | Replace the pair std::pair<const NamedDecl *, unsigned> where the unsigned represents an LVComputationKind by a PointerIntPair. This saves a pointer per entry in the map LinkageComputer::CachedLinkageInfo. Differential Revision: https://reviews.llvm.org/D52268 Reviewed by: rjmccall, george.burgess.iv, erichkeane llvm-svn: 342973
* [OpenMP][libomptarget] Simplify warp master selection for data sharingGheorghe-Teodor Bercea2018-09-251-2/+2
| | | | | | | | | | | | | | | | | | Summary: There is currently no supported situation where the warp master is not the first thread in the warp. This also avoids the device execution from hanging on Volta GPUs when ballot_sync is called by a number of threads that is less that the size of a warp. Reviewers: ABataev, caomhin, grokos Reviewed By: grokos Subscribers: guansong, openmp-commits Differential Revision: https://reviews.llvm.org/D50188 llvm-svn: 342972
* [llvm-exegesis] Fix broken test.Guillaume Chatelet2018-09-251-1/+1
| | | | llvm-svn: 342971
* [clangd] Fix some buildbots after r342965Kirill Bobyrev2018-09-251-1/+1
| | | | | | Some compilers fail to parse struct default member initializer. llvm-svn: 342970
* Revert rL342916: [X86] Remove shift/rotate by CL memory (RMW) overridesSimon Pilgrim2018-09-257-43/+97
| | | | | | | | As suggested by Craig Topper - I'm going to look at cleaning up the RMW sequences instead. The uops are slightly different to the register variant, so requires a +1uop tweak llvm-svn: 342969
* [OpenCL] Allow zero assignment and comparisons between queue_t type variablesSven van Haastregt2018-09-252-4/+33
| | | | | | | | | | | This change allows for zero assignment and comparison of queue_t type variables, and extends null_queue.cl to test this. Patch by Alistair Davies. Differential Revision: https://reviews.llvm.org/D51727 llvm-svn: 342968
* [llvm-exegesis][NFC] Rewrite of the YAML serialization.Guillaume Chatelet2018-09-256-219/+174
| | | | | | | | | | | | | | Summary: This is a NFC in preparation of exporting the initial registers as part of the YAML dump Reviewers: courbet Reviewed By: courbet Subscribers: mgorny, tschuett, llvm-commits Differential Revision: https://reviews.llvm.org/D52427 llvm-svn: 342967
* Revert r342637 "[ADT] Try again to use the same version of llvm::Optional on ↵Hans Wennborg2018-09-251-9/+5
| | | | | | | | | | | | all compilers" and also revert follow-ups r342643 and r342723. This caused Clang to be miscompiled by GCC 4.8.4 (Unbuntu 14.04's default compiler) and break the Chromium build (see https://crbug.com/888061). llvm-svn: 342966
* [clangd] Implement VByte PostingList compressionKirill Bobyrev2018-09-254-87/+228
| | | | | | | | | | | | | | | | | | | | | | | | | | | This patch implements Variable-length Byte compression of `PostingList`s to sacrifice some performance for lower memory consumption. `PostingList` compression and decompression was extensively tested using fuzzer for multiple hours and runnning significant number of realistic `FuzzyFindRequests`. AddressSanitizer and UndefinedBehaviorSanitizer were used to ensure the correct behaviour. Performance evaluation was conducted with recent LLVM symbol index (292k symbols) and the collection of user-recorded queries (7751 `FuzzyFindRequest` JSON dumps): | Metrics | Before| After | Change (%) | ----- | ----- | ----- | ----- | Memory consumption (posting lists only), MB | 54.4 | 23.5 | -60% | Time to process queries, sec | 7.70 | 9.4 | +25% Reviewers: sammccall, ioeric Reviewed By: sammccall Differential Revision: https://reviews.llvm.org/D52300 llvm-svn: 342965
* [clangd] Fix build bot after r342961Eric Liu2018-09-251-4/+3
| | | | | | | Use llvm::isAlpha instead of std::isalpha etc. This should fix bot failure: http://lab.llvm.org:8011/builders/llvm-clang-lld-x86_64-scei-ps4-windows10pro-fast/builds/20180 llvm-svn: 342964
* [Profile] Fix gcov testsCalixte Denizet2018-09-253-7/+7
| | | | | | | | | | | | | | Summary: The gcda need to be delete before running the binary to avoid to have an increasing "# of Runs" when a test is failing Reviewers: vitalybuka, eugenis, marco-c Reviewed By: marco-c Subscribers: delcypher, llvm-commits, #sanitizers, sylvestre.ledru, marco-c Differential Revision: https://reviews.llvm.org/D52456 llvm-svn: 342963
* [COFF] Add support for creating range extension thunks for ARMMartin Storsjo2018-09-2512-37/+441
| | | | | | | | | | | | This is a feature that MS link.exe lacks; it currently errors out on such relocations, just like lld did before. This allows linking clang.exe for ARM - practically, any image over 16 MB will likely run into the issue. Differential Revision: https://reviews.llvm.org/D52156 llvm-svn: 342962
* [clangd] Check that scheme is valid when parsing URI.Eric Liu2018-09-252-5/+24
| | | | | | | | | | | | Reviewers: sammccall Reviewed By: sammccall Subscribers: ilya-biryukov, MaskRay, jkorous, arphaman, kadircet, cfe-commits Differential Revision: https://reviews.llvm.org/D52455 llvm-svn: 342961
* Fix a typo in the help of clangdSylvestre Ledru2018-09-251-1/+1
| | | | llvm-svn: 342960
* [Swig] Merge typemaps with same bodiesTatyana Krasnukha2018-09-251-196/+53
| | | | | | Differential Revision: https://reviews.llvm.org/D52376 llvm-svn: 342959
* [LoopUnroll] Add check to Latch's terminator in UnrollRuntimeLoopRemainderDavid Green2018-09-254-5/+123
| | | | | | | | | | | | | In this patch, I'm adding an extra check to the Latch's terminator in llvm::UnrollRuntimeLoopRemainder, similar to how it is already done in the llvm::UnrollLoop. The compiler would crash if this function is called with a malformed loop. Patch by Rodrigo Caetano Rocha! Differential Revision: https://reviews.llvm.org/D51486 llvm-svn: 342958
* [clangd] NFC: Remove test duplicateKirill Bobyrev2018-09-251-11/+0
| | | | | | | `FuzzyMatchQ` test was a duplicate of `FuzzyMatch` pulled from MemIndex tests. llvm-svn: 342957
* [AMDGPU] restore r342722 which was reverted with r342743Sameer Sahasrabuddhe2018-09-252-0/+66
| | | | | | | | | | | | | | | | | | | [AMDGPU] lower-switch in preISel as a workaround for legacy DA Summary: The default target of the switch instruction may sometimes be an "unreachable" block, when it is guaranteed that one of the cases is always taken. The dominator tree concludes that such a switch instruction does not have an immediate post dominator. This confuses divergence analysis, which is unable to propagate sync dependence to the targets of the switch instruction. As a workaround, the AMDGPU target now invokes lower-switch as a preISel pass. LowerSwitch is designed to handle the unreachable default target correctly, allowing the divergence analysis to locate the correct immediate dominator of the now-lowered switch. llvm-svn: 342956
* Revert rL342953 "[llvm-exegesis] Add lit tests."Clement Courbet2018-09-256-33/+10
| | | | | | We also need to make sure that we're on the right subtarget. llvm-svn: 342955
* [ELF] - Add -z global option to manual.George Rimar2018-09-251-0/+6
| | | | | | | This was requested during review of D49374, but for some unknown reason was not in the final commit. llvm-svn: 342954
* [llvm-exegesis] Add lit tests.Clement Courbet2018-09-256-10/+33
| | | | | | | | | | | | | | | Summary: Right now we only have unit tests. This will allow testing the whole tool. Even though We can't really check actual values, this will avoid regressions such as PR39055. Reviewers: gchatelet, alexshap Subscribers: mgorny, tschuett, llvm-commits Differential Revision: https://reviews.llvm.org/D52407 llvm-svn: 342953
* [llvm-exegesis] Add MCParser to LLVM_LINK_COMPONENTSHeejin Ahn2018-09-251-1/+1
| | | | | | We need this to make builds with `-DBUILD_SHARED_LIBS=ON` work. llvm-svn: 342952
* Deduplicate replacements from diagnostics.Eric Liu2018-09-255-9/+31
| | | | | | | | | | | | | | | | | | | Summary: After r329813, clang-apply-replacements stopped deduplicating identical replacements; however, tools like clang-tidy relies on the deduplication of identical dignostics replacements from different TUs to apply fixes correctly. This change partially roll back the behavior by deduplicating changes from diagnostics. Ideally, we should deduplicate on diagnostics level, but we need to figure out an effecient way. Reviewers: bkramer Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D52264 llvm-svn: 342951
OpenPOWER on IntegriCloud