summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* [MIPS GlobalISel] Remove switch statement (fix r349346 for MSVC)Petar Avramovic2018-12-171-6/+1
| | | | | | | Temporarily remove switch statement without any case labels in function legalizeCustom in order to fix r349346 for MSVC. llvm-svn: 349356
* ARM: use acquire/release instruction variants when available.Tim Northover2018-12-174-16/+162
| | | | | | | | These features (fairly) recently got split out into their own feature, so we should make CodeGen use them when available. The main change here is that the check used to be based on the triple, but now it's based on CPU features. llvm-svn: 349355
* [MCA] Add support for BeginGroup/EndGroup.Andrea Di Biagio2018-12-174-10/+22
| | | | llvm-svn: 349354
* Revert "DebugInfo: Assume an absence of ranges or high_pc on a CU means the ↵Eric Liu2018-12-179-26/+75
| | | | | | | | | CU is empty (devoid of code addresses)" This reverts commit r349333. It caused internal test to fail. I have sent more information to the author. llvm-svn: 349353
* [MCA] Don't assume that createMCInstrAnalysis() always returns a valid pointer.Andrea Di Biagio2018-12-175-11/+91
| | | | | | | | | | Class InstrBuilder wrongly assumed that llvm targets were always able to return a non-null pointer when createMCInstrAnalysis() was called on them. This was causing crashes when simulating executions for targets that don't provide an MCInstrAnalysis object. This patch fixes the issue by making MCInstrAnalysis optional. llvm-svn: 349352
* [ASTImporter] Add importer specific lookupGabor Marton2018-12-179-124/+888
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: There are certain cases when normal C/C++ lookup (localUncachedLookup) does not find AST nodes. E.g.: Example 1: template <class T> struct X { friend void foo(); // this is never found in the DC of the TU. }; Example 2: // The fwd decl to Foo is not found in the lookupPtr of the DC of the // translation unit decl. struct A { struct Foo *p; }; In these cases we create a new node instead of returning with the old one. To fix it we create a new lookup table which holds every node and we are not interested in any C++ specific visibility considerations. Simply, we must know if there is an existing Decl in a given DC. Reviewers: a_sidorin, a.sidorin Subscribers: mgorny, rnkovacs, dkrupp, Szelethus, cfe-commits Differential Revision: https://reviews.llvm.org/D53708 llvm-svn: 349351
* Regenerate test in prep for SimplifyDemandedBits improvements.Simon Pilgrim2018-12-171-6/+12
| | | | llvm-svn: 349350
* [ASTImporter] Fix redecl chain of classes and class templatesGabor Marton2018-12-178-261/+899
| | | | | | | | | | | | | | | | | | | | | | | | Summary: The crux of the issue that is being fixed is that lookup could not find previous decls of a friend class. The solution involves making the friend declarations visible in their decl context (i.e. adding them to the lookup table). Also, we simplify `VisitRecordDecl` greatly. This fix involves two other repairs (without these the unittests fail): (1) We could not handle the addition of injected class types properly when a redecl chain was involved, now this is fixed. (2) DeclContext::removeDecl failed if the lookup table in Vector form did not contain the to be removed element. This caused troubles in ASTImporter::ImportDeclContext. This is also fixed. Reviewers: a_sidorin, balazske, a.sidorin Subscribers: rnkovacs, dkrupp, Szelethus, cfe-commits Differential Revision: https://reviews.llvm.org/D53655 llvm-svn: 349349
* [clangd] Change diskbackedstorage to be atomicKadir Cetinkaya2018-12-171-8/+33
| | | | | | | | | | | | | | | | Summary: There was a chance that multiple clangd instances could try to write same shard, in which case we would get a malformed file most likely. This patch changes the writing mechanism to first write to a temporary file and then rename it to fit real destination. Which is guaranteed to be atomic by POSIX. Reviewers: ilya-biryukov Subscribers: ioeric, MaskRay, jkorous, arphaman, jfb, cfe-commits Differential Revision: https://reviews.llvm.org/D55417 llvm-svn: 349348
* [AggressiveInstCombine] add test for rotate insertion point; NFCSanjay Patel2018-12-171-0/+37
| | | | | | | As noted in D55604 - we need a test to make sure that the new intrinsic is inserted into a valid position. llvm-svn: 349347
* [MIPS GlobalISel] Lower G_UADDE and narrowScalar G_ADDPetar Avramovic2018-12-174-39/+179
| | | | | | | | Lower G_UADDE and legalize G_ADD using narrowScalar on MIPS32. Differential Revision: https://reviews.llvm.org/D54580 llvm-svn: 349346
* [clangd] Only reduce priority of a thread for indexing.Kadir Cetinkaya2018-12-174-39/+58
| | | | | | | | | | | | | | | | | | Summary: We'll soon have tasks pending for reading shards from disk, we want them to have normal priority. Because: - They are not CPU intensive, mostly IO bound. - Give a good coverage for the project at startup, therefore it is worth spending some cycles. - We have only one task per whole CDB rather than one task per file. Reviewers: ilya-biryukov Subscribers: ioeric, MaskRay, jkorous, arphaman, jfb, cfe-commits Differential Revision: https://reviews.llvm.org/D55315 llvm-svn: 349345
* Revert rC349281 '[analyzer][MallocChecker][NFC] Document and reorganize some ↵Kristof Umann2018-12-171-714/+422
| | | | | | | | | | functions' Accidentally commited earlier with the same commit title, but really it should've been "Revert rC349283 '[analyzer][MallocChecker] Improve warning messages on double-delete errors'" llvm-svn: 349344
* Fix "enumeral mismatch in conditional expression" gcc7 warning. NFCI.Simon Pilgrim2018-12-171-3/+4
| | | | llvm-svn: 349343
* Fix "enumeral mismatch in conditional expression" gcc7 warnings. NFCI.Simon Pilgrim2018-12-172-20/+21
| | | | llvm-svn: 349342
* Revert rCTE349288 'Fix a lit test failure after MallocChecker changes'Kristof Umann2018-12-171-1/+1
| | | | llvm-svn: 349341
* Revert rC349281 '[analyzer][MallocChecker][NFC] Document and reorganize some ↵Kristof Umann2018-12-176-28/+20
| | | | | | functions' llvm-svn: 349340
* [AArch64][libunwind] Unwinding support for return address signing with B KeyLuke Cheeseman2018-12-172-3/+18
| | | | | | | | | | - Support for the case where the return address has been signed with the B key - When the B key is used, a 'B' character is present in the augmentation string of CIE associated with the FDE for the function. Differential Revision: https://reviews.llvm.org/D55704 llvm-svn: 349339
* [AArch64] Re-run load/store optimizer after aggressive tail duplicationAlexandros Lamprineas2018-12-173-0/+58
| | | | | | | | | The Load/Store Optimizer runs before Machine Block Placement. At O3 the Tail Duplication Threshold is set to 4 instructions and this can create new opportunities for the Load/Store Optimizer. It seems worthwhile to run it once again. llvm-svn: 349338
* [ELF][ARM] Add support for architecture v6m thunksPeter Smith2018-12-173-44/+153
| | | | | | | | | | | | | | | | | | | | | | ARM Architecture v6m is used by the smallest microcontrollers such as the cortex-m0. It is Thumb only (no Thumb 2) which prevents it from using the existing Thumb 2 range extension thunks as these use the Thumb 2 movt/movw instructions. Range extension thunks are not usually needed for microcontrollers due to the small amount of flash and ram on the device, however if code is copied from flash into ram then a range extension thunk is required to call that code. This change adds support for v6m range extension thunks. The procedure call standard APCS permits a thunk to corrupt the intra-procedural scratch register r12 (referred to as ip in the APCS). Most Thumb instructions do not permit access to high registers (r8 - r15) so the thunks must spill some low registers (r0 - r7) to perform the control transfer. Fixes pr39922 Differential Revision: https://reviews.llvm.org/D55555 llvm-svn: 349337
* Reverting bitfield size to attempt to fix a windows buildbotKristof Umann2018-12-171-1/+1
| | | | llvm-svn: 349336
* [Docs] Expand -fstack-protector and -fstack-protector-allCarey Williams2018-12-171-3/+10
| | | | | | | | | | | | Improve the description of these command line options by providing specific heuristic information, as outlined for the ssp function attribute(s) in LLVM's documentation. Also rewords -fstack-protector-all for affinity. Differential Revision: https://reviews.llvm.org/D55428 llvm-svn: 349335
* DebugInfo: Assume an absence of ranges or high_pc on a CU means the CU is ↵David Blaikie2018-12-179-75/+26
| | | | | | | | | | | | | | | | empty (devoid of code addresses) GCC emitted these unconditionally on/before 4.4/March 2012 Clang emitted these unconditionally on/before 3.5/March 2014 This improves performance when parsing CUs (especially those using split DWARF) that contain no code ranges (such as the mini CUs that may be created by ThinLTO importing - though generally they should be/are avoided, especially for Split DWARF because it produces a lot of very small CUs, which don't scale well in a bunch of other ways too (including size)). llvm-svn: 349333
* [llvm-mca] Move llvm-mca library to llvm/lib/MCA.Clement Courbet2018-12-1748-152/+145
| | | | | | | | | | | | Summary: See PR38731. Reviewers: andreadb Subscribers: mgorny, javed.absar, tschuett, gbedwell, andreadb, RKSimon, llvm-commits Differential Revision: https://reviews.llvm.org/D55557 llvm-svn: 349332
* [X86] Add test case for PR39968. NFCCraig Topper2018-12-171-0/+19
| | | | llvm-svn: 349331
* [X86] Fix bad operand lookup for cmov introduced in r349315Craig Topper2018-12-171-1/+1
| | | | | | The CC is operand 2 not operand 3. llvm-svn: 349330
* [Power9][NFC]update vabsd case for better dumpingKewen Lin2018-12-171-34/+23
| | | | | | | Appended options -ppc-vsr-nums-as-vr and -ppc-asm-full-reg-names to get the more descriptive output. Also removed useless function attributes. llvm-svn: 349329
* [analyzer] MoveChecker: Enable by default as cplusplus.Move.Artem Dergachev2018-12-173-14/+17
| | | | | | | | | | This checker warns you when you re-use an object after moving it. Mostly developed by Peter Szecsi! Differential Revision: https://reviews.llvm.org/D38675 llvm-svn: 349328
* [analyzer] MoveChecker: Add an option to suppress warnings on locals.Artem Dergachev2018-12-172-117/+384
| | | | | | | | | | | | | | | | | Re-using a moved-from local variable is most likely a bug because there's rarely a good motivation for not introducing a separate variable instead. We plan to keep emitting such warnings by default. Introduce a flag that allows disabling warnings on local variables that are not of a known move-unsafe type. If it doesn't work out as we expected, we'll just flip the flag. We still warn on move-unsafe objects and unsafe operations on known move-safe objects. Differential Revision: https://reviews.llvm.org/D55730 llvm-svn: 349327
* Speculatively re-apply "[analyzer] MoveChecker: Add checks for dereferencing..."Artem Dergachev2018-12-172-56/+178
| | | | | | | | | | | | This re-applies commit r349226 that was reverted in r349233 due to failures on clang-x64-windows-msvc. Specify enum type as unsigned for use in bit field. Otherwise overflows may cause UB. Differential Revision: https://reviews.llvm.org/D55388 llvm-svn: 349326
* [Power9][NFC]Make pre-inc-disable case more robustKewen Lin2018-12-171-28/+28
| | | | | | | With some patch adopted for Power9 vabsd* insns, some CHECKs can't get the expected results. But it's false alarm, we should update the case more robust. llvm-svn: 349325
* [gn build] Add build files for opt and its dependency Transforms/CouroutinesNico Weber2018-12-174-1/+61
| | | | | | | | Needed for check-lld. Differential Revision: https://reviews.llvm.org/D55750 llvm-svn: 349324
* [EarlyCSE] If DI can't be salvaged, mark it as unavailable.Davide Italiano2018-12-172-1/+71
| | | | | | Fixes PR39874. llvm-svn: 349323
* [InstCombine] Add cttz/ctlz + select non-bitwidth tests; NFCNikita Popov2018-12-161-0/+56
| | | | llvm-svn: 349322
* [InstCombine] Regenerate test checks; NFCNikita Popov2018-12-161-147/+150
| | | | | | | Also drop unnecessary entry blocks and avoid use of anonymous variables. llvm-svn: 349321
* [analyzer] Fix some expressions staying live too long. Add a debug checker.Artem Dergachev2018-12-167-3/+286
| | | | | | | | | | | | | | | | | | | | | StaticAnalyzer uses the CFG-based RelaxedLiveVariables analysis in order to, in particular, figure out values of which expressions are still needed. When the expression becomes "dead", it is garbage-collected during the dead binding scan. Expressions that constitute branches/bodies of control flow statements, eg. `E1' in `if (C1) E1;' but not `E2' in `if (C2) { E2; }', were kept alive for too long. This caused false positives in MoveChecker because it relies on cleaning up loop-local variables when they go out of scope, but some of those live-for-too-long expressions were keeping a reference to those variables. Fix liveness analysis to correctly mark these expressions as dead. Add a debug checker, debug.DumpLiveStmts, in order to test expressions liveness. Differential Revision: https://reviews.llvm.org/D55566 llvm-svn: 349320
* [X86] Pull out constant splat rotation detection.Simon Pilgrim2018-12-161-21/+28
| | | | | | We had 3 different approaches - consistently use getTargetConstantBitsFromNode and allow undef elts. llvm-svn: 349319
* [InstCombine] Make cttz/ctlz knownbits tests more robust; NFCNikita Popov2018-12-161-20/+12
| | | | | | | Tests checking for the addition of !range metadata should be preserved if cttz/ctlz + icmp is optimized. llvm-svn: 349318
* Regenerate test (merges X86+X64 cases). NFCI. Simon Pilgrim2018-12-161-594/+265
| | | | llvm-svn: 349317
* Add a description of the similar packets defined in theJason Molenda2018-12-161-3/+18
| | | | | | | | | | | gdb-remote serial protocol documentation, call out the incompatability of lldb's vFile:open: packet as it stands today. Need to think about whether to change lldb's enum values (breaking any existing lldb-server's out there) or create a different packet and abandon vFile:open: at least for a while. llvm-svn: 349316
* [X86] Remove truncation handling from EmitTest. Replace it with a DAG combine.Craig Topper2018-12-163-55/+111
| | | | | | | | | | I'd like to try to move a lot of the flag matching out of EmitTest and push it to isel or isel preprocessing. This is a step towards that. The test-shrink-bug.ll changie is an improvement because we are no longer interfering with test shrink handling in isel. The pr34137.ll change is a regression, but the IR came from -O0 and was not reduced by InstCombine. So it contains a lot of redundancies like duplicate loads that made it combine poorly. llvm-svn: 349315
* [X86] Autogenerate complete checks. NFCCraig Topper2018-12-161-7/+36
| | | | llvm-svn: 349314
* Clarify a few minor details.Jason Molenda2018-12-161-7/+8
| | | | llvm-svn: 349313
* Revert "[InstCombine] Regenerate test checks; NFC"Nikita Popov2018-12-161-166/+117
| | | | | | | | This reverts commit r349311. Didn't check this carefully enough... llvm-svn: 349312
* [InstCombine] Regenerate test checks; NFCNikita Popov2018-12-161-117/+166
| | | | llvm-svn: 349311
* [InstCombined] Add more tests for cttz/ctlz + icmp; NFCNikita Popov2018-12-161-11/+144
| | | | | | Test cases other than icmp with the bitwidth. llvm-svn: 349310
* [InstCombine] Add additional saturating add/sub + icmp tests; NFCNikita Popov2018-12-161-12/+133
| | | | | | | These test comparisons with saturating add/sub in non-canonical form. llvm-svn: 349309
* Thread safety analysis: Avoid intermediate copies [NFC]Aaron Puchert2018-12-161-21/+31
| | | | | | | The main reason is to reduce the number of constructor arguments though, especially since many of them had the same type. llvm-svn: 349308
* [InstCombine] regenerate test checks; NFCSanjay Patel2018-12-162-448/+439
| | | | llvm-svn: 349307
* [InstCombine] add tests for vector widening transforms (PR40032); NFCSanjay Patel2018-12-161-0/+32
| | | | llvm-svn: 349306
OpenPOWER on IntegriCloud