summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* [x86] add tests for load scalar + insertelement; NFCSanjay Patel2018-08-221-0/+814
| | | | llvm-svn: 340425
* [Android] Default to -fno-math-errnoPirama Arumuga Nainar2018-08-223-0/+9
| | | | | | | | | | | | Summary: Android's libm does not set errno. Reviewers: srhines, enh Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D51068 llvm-svn: 340424
* [WebAssembly] Ensure relocation entries are ordered by offsetSam Clegg2018-08-222-5/+22
| | | | | | | | | | | | | wasm-lld expects relocation entries to be sorted by offset. In most cases llvm produces them in order, but the CODE section (which combines many MCSections) is an exception because we order the functions in Symbol order, not in section order. What is more, its not clear weather `recordRelocation` is guaranteed to be called in offset order so this sort of most likely needed in the general case too. Differential Revision: https://reviews.llvm.org/D51065 llvm-svn: 340423
* [llvm-mca] Remove unused decl. NFC.Matt Davis2018-08-221-2/+0
| | | | llvm-svn: 340422
* [Tooling] Allow -flto flags and filter out -Wa, flagsChih-Hung Hsieh2018-08-222-6/+17
| | | | | | | | | | | | | This change fixes the problem in https://bugs.llvm.org/show_bug.cgi?id=38332 by allowing driver::Action::BackendJobClass to run with the analyzer. Otherwise, such jobs will look up the non-existing compilation database and then run without flags. Also filter out the -Wa,* flags that could be passed to and ignored by the clang compiler. Clang-tidy gives warnings about unused -Wa,* flags. Differential Revision: http://reviews.llvm.org/D51002 llvm-svn: 340421
* lld-link: Emit warning if one each of {main,wmain} and {WinMain,wWinMain} ↵Nico Weber2018-08-222-2/+66
| | | | | | | | | exist and no /subsystem: flag is passed. Similar to link.exe's LNK4031. https://reviews.llvm.org/D51076 llvm-svn: 340420
* AMDGPU: bump AS.MAX_COMMON_ADDRESS to 6 since 32-bit addr spaceSamuel Pitoiset2018-08-224-32/+48
| | | | | | | | | | | | | | | | 32-bit constant address space is declared as 6, so the maximum number of address spaces is 6, not 5. Fixes "LLVM ERROR: Pointer address space out of range". v5: rename MAX_COMMON_ADDRESS to MAX_AMDGPU_ADDRESS v4: - fix compilation issues - fix out of bounds access v3: use static_assert() v2: add a very simple test for 32-bit addr space Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=106630 llvm-svn: 340417
* AMDGPU: fix existing alias rules for constant and globalSamuel Pitoiset2018-08-222-5/+17
| | | | | | | | | | Constant and global may alias, also one rules table wasn't ordered correctly. Pinpointed by Matt. v2: add a test with swapped parameters llvm-svn: 340416
* [X86][SSE] LowerMULH vXi8 - use SSE shifts directly.Simon Pilgrim2018-08-223-175/+72
| | | | | | We know these vXi16 extended cases are legal constant splat shifts. llvm-svn: 340414
* [ELF][HEXAGON] Add R_HEX_16_X relocationSid Manning2018-08-222-0/+35
| | | | | | | | This relocation has only 6-bits the remaining are in the extender. Differential Revision: https://reviews.llvm.org/D50603 llvm-svn: 340413
* [clang-tidy] Add Abseil prefix to documentationHaojian Wu2018-08-221-0/+1
| | | | | | | | | | | | | | | | | | Summary: Adds the Abseil prefix to the list of prefixes in the documentation Patch by Deanna Garcia! Reviewers: aaron.ballman, hokein Reviewed By: hokein Subscribers: xazax.hun, cfe-commits Tags: #clang-tools-extra Differential Revision: https://reviews.llvm.org/D51100 llvm-svn: 340412
* [clang-tidy] Abseil: faster strsplit delimiter checkHaojian Wu2018-08-228-0/+318
| | | | | | | | | | | This check is an abseil specific check that checks for code using single character string literals as delimiters and transforms the code into characters. The check was developed internally and has been running at google, this is just a move to open source the check. It was originally written by @sbenza. Patch by Deanna Garcia! llvm-svn: 340411
* [clangd] Get rid of regexes in CanonicalIncludesIlya Biryukov2018-08-222-679/+687
| | | | | | | | | | | | | | Summary: Replace them with suffix mappings. Reviewers: ioeric, kbobyrev Reviewed By: ioeric Subscribers: MaskRay, jkorous, arphaman, jfb, kadircet, cfe-commits Differential Revision: https://reviews.llvm.org/D51088 llvm-svn: 340410
* [clangd] Implement BOOST iteratorKirill Bobyrev2018-08-224-40/+185
| | | | | | | | | | | | | | | This patch introduces BOOST iterator - a substantial block for efficient and high-quality symbol retrieval. The concept of boosting allows performing computationally inexpensive scoring on the query side so that the final (expensive) scoring can only be applied on the items with the highest preliminary score while eliminating the need to score too many items. Reviewed by: ilya-biryukov Differential Revision: https://reviews.llvm.org/D50970 llvm-svn: 340409
* [CodeGen] Look at the type of a block capture field rather than the typeAkira Hatanaka2018-08-223-39/+98
| | | | | | | | | | | | | | of the captured variable when determining whether the capture needs special handing when the block is copied or disposed. This fixes bugs in the handling of variables captured by a block that is nested inside a lambda that captures the variables by reference. rdar://problem/43540889 Differential Revision: https://reviews.llvm.org/D51025 llvm-svn: 340408
* [analyzer] Improve `CallDescription` to handle c++ method.Henry Wong2018-08-223-52/+85
| | | | | | | | | | | | | | | | | Summary: `CallDecription` can only handle function for the time being. If we want to match c++ method, we can only use method name to match and can't improve the matching accuracy through the qualifiers. This patch add the support for `QualifiedName` matching to improve the matching accuracy. Reviewers: xazax.hun, NoQ, george.karpenkov, rnkovacs Reviewed By: xazax.hun, NoQ, rnkovacs Subscribers: Szelethus, szepet, rnkovacs, a.sidorin, mikhail.ramalho, cfe-commits, MTC Differential Revision: https://reviews.llvm.org/D48027 llvm-svn: 340407
* Attempt to unbreak filesystem tests on certain linux distros.Eric Fiselier2018-08-221-1/+6
| | | | | | | | | | | | | | | On some platforms clock_gettime is in librt, which we don't link by default when building the tests. However it is required by the filesystem tests. This patch introduces a workaround which links librt whenever the filesystem tests are enabled. The workaround should later be replaced with a patch that selectively links both libc++fs and librt only when building filesystem specific tests. However, the way the test configuration is set up right now, this is non-trivial. llvm-svn: 340406
* [ARM] Rotated operand patterns for *xtb16Sam Parker2018-08-223-0/+159
| | | | | | | | | Add intrinsic isel patterns for sxtb16, sxtab16, uxtb16 and uxtab16 so that they can perform a ror. Differential Revision: https://reviews.llvm.org/D51034 llvm-svn: 340405
* [clangd] Make FileIndex aware of the main fileIlya Biryukov2018-08-224-33/+64
| | | | | | | | | | | | | | | | | | | | | Summary: It was previously only indexing the preamble decls. The new implementation will index both the preamble and the main AST and report both sets of symbols, preferring the ones from the main AST whenever the symbol is present in both. The symbols in the main AST slab always store all information available in the preamble symbols, possibly adding more, e.g. definition locations. Reviewers: hokein, ioeric Reviewed By: ioeric Subscribers: kadircet, MaskRay, jkorous, arphaman, cfe-commits Differential Revision: https://reviews.llvm.org/D50889 llvm-svn: 340404
* [Preamble] Fix an undefined behavior when checking an empty preamble can be ↵Haojian Wu2018-08-221-2/+2
| | | | | | | | | | | | | | | | reused. Summary: Passing nullptr to memcmp is UB. Reviewers: ilya-biryukov Reviewed By: ilya-biryukov Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D50967 llvm-svn: 340403
* Fix import of class templates partial specializationGabor Marton2018-08-224-26/+355
| | | | | | | | | | | | | | | | | | | Summary: Currently there are several issues with the import of class template specializations. (1) Different TUs may have class template specializations with the same template arguments, but with different set of instantiated MethodDecls and FieldDecls. In this patch we provide a fix to merge these methods and fields. (2) Currently, we search the partial template specializations in the set of simple specializations and we add partial specializations as simple specializations. This is bad, this patch fixes it. Reviewers: a_sidorin, xazax.hun, r.stahl Subscribers: rnkovacs, dkrupp, cfe-commits Differential Revision: https://reviews.llvm.org/D50451 llvm-svn: 340402
* [clangd] Add callbacks on parsed AST in addition to parsed preamblesIlya Biryukov2018-08-225-41/+86
| | | | | | | | | | | | | | | | | | | | | | | | | Summary: Will be used for updating the dynamic index on updates to the open files. Currently we collect only information coming from the preamble AST. This has a bunch of limitations: - Dynamic index misses important information from the body of the file, e.g. locations of definitions. - XRefs cannot be collected at all, since we can only obtain full information for the current file (preamble is parsed with skipped function bodies, therefore not reliable). This patch only adds the new callback, actually updates to the index will be done in a follow-up patch. Reviewers: hokein Reviewed By: hokein Subscribers: kadircet, javed.absar, ioeric, MaskRay, jkorous, arphaman, cfe-commits Differential Revision: https://reviews.llvm.org/D50847 llvm-svn: 340401
* [COFF] Move a comment close to the code it refers to. NFC.Martin Storsjo2018-08-221-3/+3
| | | | llvm-svn: 340400
* [COFF] Change fatal() into error() when writing chunks to the outputMartin Storsjo2018-08-221-15/+20
| | | | | | | | | | In most of these cases, it's easy to go on despite the error, printing as many valuable error messages as possible from one run as possible. Differential Revision: https://reviews.llvm.org/D51087 llvm-svn: 340399
* [AArch64] Add Tiny Code Model for AArch64David Green2018-08-224-2/+5
| | | | | | | | Adds a tiny code model to Clang along side rL340397. Differential Revision: https://reviews.llvm.org/D49674 llvm-svn: 340398
* [AArch64] Add Tiny Code Model for AArch64David Green2018-08-2234-51/+794
| | | | | | | | | | | | | | This adds the plumbing for the Tiny code model for the AArch64 backend. This, instead of loading addresses through the normal ADRP;ADD pair used in the Small model, uses a single ADR. The 21 bit range of an ADR means that the code and its statically defined symbols need to be within 1MB of each other. This makes it mostly interesting for embedded applications where we want to fit as much as we can in as small a space as possible. Differential Revision: https://reviews.llvm.org/D49673 llvm-svn: 340397
* AMDGPU: Fix not respecting byval alignment in call frame setupMatt Arsenault2018-08-226-41/+174
| | | | | | | | | This was hackily adding in the 4-bytes reserved for the callee's emergency stack slot. Treat it like a normal stack allocation so we get the correct alignment padding behavior. This fixes an inconsistency between the caller and callee. llvm-svn: 340396
* [llvm-mca] Improved code comments and moved some method definitions from ↵Andrea Di Biagio2018-08-222-81/+98
| | | | | | Scheduler.h to Scheduler.cpp. NFC llvm-svn: 340395
* Fix Wdocumentation warnings. NFCI.Simon Pilgrim2018-08-222-8/+7
| | | | llvm-svn: 340394
* [X86][SSE] Add sdiv test case from PR38658Simon Pilgrim2018-08-221-0/+202
| | | | llvm-svn: 340393
* [mips] Handle missing CondCodesStefan Maksimovic2018-08-222-0/+92
| | | | | | | | | | | | | | | | | | | | Add patterns for unhandled CondCode enumerables: SETEQ, SETGE, SETGT, SETLE, SETLT, SETNE. Stated at the ISD::CondCode enum declaration: `All of these (except for the 'always folded ops') should be handled for floating point.` Add patterns which use these nodes, same as corresponding 'ordered' CondCode nodes. Referring to 'Ordered means that neither operand is a QNAN' we assume it is safe to match ex. SETLT node to the same instruction as SETOLT. Differential Revision: https://reviews.llvm.org/D50757 llvm-svn: 340392
* [clang][mips] Set __mips_fpr correctly for -mfpxxStefan Maksimovic2018-08-224-19/+104
| | | | | | | | | | | | | | | | | | | | Set __mips_fpr to 0 if o32 ABI is used with either -mfpxx or none of -mfp32, -mfpxx, -mfp64 being specified. Introduce additional checks: -mfpxx is only to be used in conjunction with the o32 ABI. report an error when incompatible options are provided. Formerly no errors were raised when combining n32/n64 ABIs with -mfp32 and -mfpxx. There are other cases when __mips_fpr should be set to 0 that are not covered, ex. using o32 on a mips64 cpu which is valid but not supported in the backend as of yet. Differential Revision: https://reviews.llvm.org/D50557 llvm-svn: 340391
* [clang-tblgen] Add -print-records and -dump-json modes.Simon Tatham2018-08-221-0/+12
| | | | | | | | | | | | | | | | | | | | | | Currently, if clang-tblgen is run without a mode option, it defaults to the first mode in its 'enum Action', which happens to be -gen-clang-attr-classes. I think it makes more sense for it to behave the same way as llvm-tblgen, i.e. print a diagnostic dump if it's not given any more specific instructions. I've also added the same -dump-json that llvm-tblgen supports. This means any tblgen command line (whether llvm- or clang-) can be mechanically turned into one that processes the same input into JSON. Reviewers: nhaehnle Reviewed By: nhaehnle Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D50771 llvm-svn: 340390
* [XRay] Refactor file header reading (NFC)Dean Michael Berris2018-08-224-64/+119
| | | | | | | | | | | | | | | | Summary: This patch moves out the definition of the XRay log file header from binary logs into its own header and implementation file. This is one part of the refactoring being done in D50441. Reviewers: eizan Subscribers: mgorny, hiraditya, llvm-commits Differential Revision: https://reviews.llvm.org/D51086 llvm-svn: 340389
* [clangd] Cleanup after D50897Kirill Bobyrev2018-08-221-1/+1
| | | | | | | The wrong diff that was uploaded to Phabricator was building the wrong index. llvm-svn: 340388
* Change how we handle -wrap.Rui Ueyama2018-08-2210-131/+171
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | We have an issue with -wrap that the option doesn't work well when renamed symbols get PLT entries. I'll explain what is the issue and how this patch solves it. For one -wrap option, we have three symbols: foo, wrap_foo and real_foo. Currently, we use memcpy to overwrite wrapped symbols so that they get the same contents. This works in most cases but doesn't when the relocation processor sets some flags in the symbol. memcpy'ed symbols are just aliases, so they always have to have the same contents, but the relocation processor breaks that assumption. r336609 is an attempt to fix the issue by memcpy'ing again after processing relocations, so that symbols that are out of sync get the same contents again. That works in most cases as well, but it breaks ASan build in a mysterious way. We could probably fix the issue by choosing symbol attributes that need to be copied after they are updated. But it feels too complicated to me. So, in this patch, I fixed it once and for all. With this patch, we no longer memcpy symbols. All references to renamed symbols point to new symbols after wrapSymbols() is done. Differential Revision: https://reviews.llvm.org/D50569 llvm-svn: 340387
* [AST] correct the behavior of -fvisibility-inlines-hidden option (don't make ↵Hiroshi Inoue2018-08-222-0/+75
| | | | | | | | | | | | | static local variables hidden) The command line option -fvisibility-inlines-hidden makes inlined method hidden, but it is expected not to affect the visibility of static local variables in the function. However, Clang makes the static local variables in the function also hidden as reported in PR37595. This problem causes LLVM bootstarp failure on Fedora 28 if configured with -DBUILD_SHARED_LIBS=ON. This patch makes the behavior of -fvisibility-inlines-hidden option to be consistent with that of gcc; the option does not change the visibility of the static local variables if the containing function does not associated with explicit visibility attribute and becomes hidden due to this option. Differential Revision: https://reviews.llvm.org/D50968 llvm-svn: 340386
* Fix Bug 38644: multimap::clear() missing exception specifier. Add noexcept ↵Marshall Clow2018-08-2213-12/+114
| | | | | | tests for all the containers that have clear(). llvm-svn: 340385
* [AST] Fix a whitespace typo [NFC]Philip Reames2018-08-221-1/+1
| | | | llvm-svn: 340384
* [AST] Reorder code to reduce a future patch diff [NFC]Philip Reames2018-08-221-3/+3
| | | | llvm-svn: 340383
* [AST] Move a function definition into the cpp [NFC]Philip Reames2018-08-222-11/+13
| | | | llvm-svn: 340382
* [GuardWidening] Ignore guards with trivial conditionsMax Kazantsev2018-08-222-0/+32
| | | | | | | | | | | | Guard widening should not spend efforts on dealing with guards with trivial true/false conditions. Such guards can easily be eliminated by any further cleanup pass like instcombine. However we should not unconditionally delete them because it may be profitable to widen other conditions into such guards. Differential Revision: https://reviews.llvm.org/D50247 Reviewed By: fedor.sergeev llvm-svn: 340381
* [gold] -thinlto-object-suffix-replace: don't append new suffix if path does ↵Fangrui Song2018-08-222-7/+14
| | | | | | | | | | | | | | | | not end with old suffix Summary: This is to be consistent with lld behavior since rLLD340364. Reviewers: tejohnson Reviewed By: tejohnson Subscribers: steven_wu, eraman, mehdi_amini, inglorion, dexonsmith, llvm-commits Differential Revision: https://reviews.llvm.org/D51060 llvm-svn: 340380
* [CodeGenPrepare] Set debug loc when widening a switch conditionVedant Kumar2018-08-222-0/+9
| | | | | | | Set a debug location on the cast instruction used to widen a switch condition. llvm-svn: 340379
* [analyzer] [NFC] Fix minor formatting issues in RetainCountCheckerGeorge Karpenkov2018-08-223-10/+8
| | | | | | Differential Revision: https://reviews.llvm.org/D51072 llvm-svn: 340378
* [analyzer] [NFC] Extract a method for creating RefVal from RetEffect in ↵George Karpenkov2018-08-221-34/+17
| | | | | | | | RetainCountChecker Differential Revision: https://reviews.llvm.org/D51071 llvm-svn: 340377
* Update the docs for using LLVM toolset in Visual StudioStephen Kelly2018-08-221-9/+10
| | | | | | | | | | Reviewers: hans Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D51079 llvm-svn: 340376
* [Support][CachePruning] prune least recently accessed files firstBob Haarman2018-08-223-35/+78
| | | | | | | | | | | | | | | | | Summary: Before this change, pruning order was based on size. This changes it to be based on time of last use instead, preferring to keep recently used files and prune older ones. Reviewers: pcc, rnk, espindola Reviewed By: rnk Subscribers: emaste, arichardson, hiraditya, steven_wu, dexonsmith, llvm-commits Differential Revision: https://reviews.llvm.org/D51062 llvm-svn: 340374
* [WebAssembly] Fix typos in mem.grow/memory.grow opcodesHeejin Ahn2018-08-221-2/+2
| | | | | | This should be not 0x3f but 0x40. llvm-svn: 340373
* [WebAssembly] Change comments on SP writing back (NFC)Heejin Ahn2018-08-222-3/+5
| | | | | | | | | | | | Summary: We now write back not to memory but to __stack_pointer global. Reviewers: dschuff Subscribers: sbc100, jgravelle-google, sunfish, llvm-commits Differential Revision: https://reviews.llvm.org/D51074 llvm-svn: 340372
OpenPOWER on IntegriCloud