summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* [sanitizer] Introduce a vDSO aware time function, and use it in the ↵Kostya Kortchinsky2017-12-1112-6/+59
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | allocator [redo] Summary: Redo of D40657, which had the initial discussion. The initial code had to move into a libcdep file, and things had to be shuffled accordingly. `NanoTime` is a time sink when checking whether or not to release memory to the OS. While reducing the amount of calls to said function is in the works, another solution that was found to be beneficial was to use a timing function that can leverage the vDSO. We hit a couple of snags along the way, like the fact that the glibc crashes when clock_gettime is called from a preinit_array, or the fact that `__vdso_clock_gettime` is mangled (for security purposes) and can't be used directly, and also that clock_gettime can be intercepted. The proposed solution takes care of all this as far as I can tell, and significantly improve performances and some Scudo load tests with memory reclaiming enabled. @mcgrathr: please feel free to follow up on https://reviews.llvm.org/D40657#940857 here. I posted a reply at https://reviews.llvm.org/D40657#940974. Reviewers: alekseyshl, krytarowski, flowerhack, mcgrathr, kubamracek Reviewed By: alekseyshl, krytarowski Subscribers: #sanitizers, mcgrathr, srhines, llvm-commits, kubamracek Differential Revision: https://reviews.llvm.org/D40679 llvm-svn: 320409
* Ensure moved-from container is cleared on moveGeorge Burgess IV2017-12-112-0/+7
| | | | | | | | | In all cases except for this optimistic attempt to reuse memory, the moved-from TinyPtrVector was left `empty()` at the end of this assignment. Though using a container after it's been moved from can be a bit sketchy, it's probably best to just be consistent here. llvm-svn: 320408
* [InstCombine] Fix PR35618: Instcombine hangs on single minmax load bitcast.Alexey Bataev2017-12-112-2/+47
| | | | | | | | | | | | | | | | | Summary: If we have pattern `store (load(bitcast(select (cmp(V1, V2), &V1, &V2)))), bitcast)`, but the load is used in other instructions, it leads to looping in InstCombiner. Patch adds additional check that all users of the load instructions are stores and then replaces all uses of load instruction by the new one with new type. Reviewers: RKSimon, spatel, majnemer Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D41072 llvm-svn: 320407
* [clang-tidy] Correctly classify constant arrays and constant strings as ↵Alexander Kornienko2017-12-112-33/+84
| | | | | | | | | | | | | | | | | | | | constants when checking identifiers naming Summary: They are not locally const qualified so they weren't classified as constants by the readability-identifier-naming check. Reviewers: alexfh Reviewed By: alexfh Subscribers: klimek, cfe-commits, xazax.hun Patch by Beren Minor! Differential Revision: https://reviews.llvm.org/D39363 llvm-svn: 320406
* Fix warn-enum-compare.cpp on WindowsHans Wennborg2017-12-111-1/+6
| | | | | | It's been failing since r319875. llvm-svn: 320405
* [Hexagon] Add support for Hexagon V65Krzysztof Parzyszek2017-12-1169-5709/+13168
| | | | llvm-svn: 320404
* [X86] Add LODS schedule testsSimon Pilgrim2017-12-111-6/+103
| | | | llvm-svn: 320403
* [X86] Add CMP/TEST schedule testsSimon Pilgrim2017-12-111-2/+1184
| | | | llvm-svn: 320402
* P0620 follow-up: deducing `auto` from braced-init-list in new exprZhihao Yuan2017-12-116-10/+41
| | | | | | | | | | | | | | | | | | | Summary: This is a side-effect brought in by p0620r0, which allows other placeholder types (derived from `auto` and `decltype(auto)`) to be usable in a `new` expression with a single-clause //braced-init-list// as its initializer (8.3.4 [expr.new]/2). N3922 defined its semantics. References: http://wg21.link/p0620r0 http://wg21.link/n3922 Reviewers: rsmith, aaron.ballman Reviewed By: rsmith Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D39451 llvm-svn: 320401
* [X86] Add AND/OR/XOR schedule testsSimon Pilgrim2017-12-111-3/+1926
| | | | llvm-svn: 320400
* [dwarfdump] Fix off-by-one bug in accelerator table extractor.Jonas Devlieghere2017-12-116-10/+16
| | | | | | | | | | | | | | | This fixes a bug where the verifier was complaining about empty accelerator tables. When the table is empty, its size is not a valid offset as it points after the end of the section. This patch also makes the extractor return llvm:Error instead of bool for better error reporting in the verifier. Differential revision: https://reviews.llvm.org/D41063 rdar://35932007 llvm-svn: 320399
* Revert 320391: Certain targets are failing, pulling back to diagnose.Erich Keane2017-12-1124-155/+58
| | | | llvm-svn: 320398
* [X86] Add ADD/SUB schedule testsSimon Pilgrim2017-12-111-2/+1285
| | | | llvm-svn: 320397
* [Sema] Fix crash in unused-lambda-capture warning for VLAsMalcolm Parsons2017-12-113-0/+13
| | | | | | | | | | | | | | | | | | | | Summary: Clang was crashing when diagnosing an unused-lambda-capture for a VLA because From.getVariable() is null for the capture of a VLA bound. Warning about the VLA bound capture is not helpful, so only warn for the VLA itself. Fixes: PR35555 Reviewers: aaron.ballman, dim, rsmith Reviewed By: aaron.ballman, dim Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D41016 llvm-svn: 320396
* [X86] Add ADC/SBB schedule testsSimon Pilgrim2017-12-111-2/+1284
| | | | llvm-svn: 320395
* Sort.Rui Ueyama2017-12-111-2/+2
| | | | llvm-svn: 320394
* Change function type more LLVM-ish.Rui Ueyama2017-12-111-2/+2
| | | | | | Also fix variable naming style. llvm-svn: 320393
* [X86] Add MOVSLQ schedule testsSimon Pilgrim2017-12-111-1/+97
| | | | llvm-svn: 320392
* For Linux/gnu compatibility, preinclude <stdc-predef.h> if the file is availableErich Keane2017-12-1124-58/+155
| | | | | | | | | | | | | | | | | | | | As reported in llvm bugzilla 32377. Here’s a patch to add preinclude of stdc-predef.h. The gcc documentation says “On GNU/Linux, <stdc-predef.h> is pre-included.” See https://gcc.gnu.org/gcc-4.8/porting_to.html; The preinclude is inhibited with –ffreestanding. Basically I fixed the failing test cases by adding –ffreestanding which inhibits this behavior. I fixed all the failing tests, including some in extra/test, there's a separate patch for that which is linked here Note: this is a recommit after a test failure took down the original (r318669) Patch By: mibintc Differential Revision: https://reviews.llvm.org/D34158 llvm-svn: 320391
* Create reserved symbols early so they can be versioned.Rafael Espindola2017-12-114-13/+54
| | | | | | | | | | | | | | | | | | | | | This fixes pr35570. We were creating these symbols after parsing version scripts, so they could not be versioned. We cannot move the version script parsing later because we need it for lto. One option is to move both addReservedSymbols and createSyntheticSections earlier. The disadvantage is that some sections created by createSyntheticSections replace other input sections. For example, gdb index replaces .debug_gnu_pubnames, so it wants to run after gc sections so that it can set S->Live to false. What this patch does instead is to move just the ElfHeader creation early. llvm-svn: 320390
* Normalize line endings. NFCI.Simon Pilgrim2017-12-111-30/+30
| | | | llvm-svn: 320389
* [GlobalISel] Disable GISel for big endian.Amara Emerson2017-12-114-2/+16
| | | | | | | | | | | | | This is due to PR26161 needing to be resolved before we can fix big endian bugs like PR35359. The work to split aggregates into smaller LLTs instead of using one large scalar will take some time, so in the mean time we'll fall back to SDAG. Some ARM BE tests xfailed for now as a result. Differential Revision: https://reviews.llvm.org/D40789 llvm-svn: 320388
* [X86] Add LWP schedule testsSimon Pilgrim2017-12-112-2/+181
| | | | | | Tag LWP instructions as WriteSystem llvm-svn: 320387
* [X86] Add INT/INTO schedule testsSimon Pilgrim2017-12-112-2/+147
| | | | llvm-svn: 320386
* [X86] Add IN/OUT schedule testsSimon Pilgrim2017-12-111-2/+246
| | | | llvm-svn: 320385
* [X86] Add IDIV schedule testsSimon Pilgrim2017-12-111-1/+164
| | | | llvm-svn: 320384
* [X86] Add CMPXCHG schedule testsSimon Pilgrim2017-12-111-3/+415
| | | | llvm-svn: 320383
* [X86] Add CLZERO schedule testSimon Pilgrim2017-12-111-0/+20
| | | | llvm-svn: 320382
* [MSan] Hotfix compilationAlexander Potapenko2017-12-111-2/+2
| | | | | | | For some reason the override directives got removed in r320373. I suspect this to be an unwanted effect of clang-format. llvm-svn: 320381
* [X86] Add ADCX/ADOX/XADD/XLAT schedule testsSimon Pilgrim2017-12-111-3/+617
| | | | llvm-svn: 320380
* [X86] Modify Nontemporal tests to avoid deadstore optimization.Nirav Dave2017-12-114-47/+167
| | | | llvm-svn: 320379
* [AMDGPU] Rename Bonaire target to be gfx704; update target feature handlingTony Tye2017-12-111-139/+144
| | | | | | | | | | | | - Rename Bonaire target to be gfx704. - Eliminate gfx800 and make Iceland and Tonga both use gfx802 as they use the same code. - List target features supported by each processor in the processor table together with the default value. - Add xnack flag to e_flags. - Remove xnack from kernel metadata and kernel descriptor since it is now a whole code object property. Differential Revision: https://reviews.llvm.org/D40051 llvm-svn: 320378
* dotest.py: Correctly annotate lldbinline tests with debug info categoriesPavel Labath2017-12-111-1/+4
| | | | | | | This enables one to run all dwo tests with dotest.py --category dwo, or skip them with --skip-category. llvm-svn: 320377
* [X86] Add SETCC/STC/STD/UD2 schedule testsSimon Pilgrim2017-12-111-3/+541
| | | | llvm-svn: 320376
* [AMDGPU][MC][GFX9] Corrected encoding of ttmp registers, disabled tba/tmaDmitry Preobrazhensky2017-12-1114-77/+396
| | | | | | | | | | | | See bugs 35494 and 35559: https://bugs.llvm.org/show_bug.cgi?id=35494 https://bugs.llvm.org/show_bug.cgi?id=35559 Reviewers: vpykhtin, artem.tamazov, arsenm Differential Revision: https://reviews.llvm.org/D41007 llvm-svn: 320375
* [DAGCombiner] protect against an infinite loop between shl <--> mul (PR35579)Sanjay Patel2017-12-112-1/+36
| | | | | | | | | | | | | | | | | | | | | | | At first, I tried to thread the x86 needle and use a target hook (isVectorShiftByScalarCheap()) to disable the transform only for non-splat pow-of-2 constants, but not AVX2, but only some element types, but...it's difficult. Here we just avoid the loop with the x86 vector transform that conflicts with the general DAG combine and preserve all of the existing behavior AFAICT otherwise. Some tests that will probably fail if someone does try to restrict this in a more targeted way for x86-only may be found in: test/CodeGen/X86/combine-mul.ll test/CodeGen/X86/vector-mul.ll test/CodeGen/X86/widen_arith-5.ll This should prevent the infinite looping seen with: https://bugs.llvm.org/show_bug.cgi?id=35579 Differential Revision: https://reviews.llvm.org/D41040 llvm-svn: 320374
* [MSan] introduce getShadowOriginPtr(). NFC.Alexander Potapenko2017-12-111-129/+191
| | | | | | | | | | | | | | This patch introduces getShadowOriginPtr(), a method that obtains both the shadow and origin pointers for an address as a Value pair. The existing callers of getShadowPtr() and getOriginPtr() are updated to use getShadowOriginPtr(). The rationale for this change is to simplify KMSAN instrumentation implementation. In KMSAN origins tracking is always enabled, and there's no direct mapping between the app memory and the shadow/origin pages. Both the shadow and the origin pointer for a given address are obtained by calling a single runtime hook from the instrumentation, therefore it's easier to work with those pointers together. Reviewed at https://reviews.llvm.org/D40835. llvm-svn: 320373
* [ELF] Improve comments in aarch64 errata fix test [NFC]Peter Smith2017-12-111-20/+19
| | | | | | | Comment improvements split out from review D36749. No changes to any non comment line. llvm-svn: 320372
* [X86] Add SAR/SHL/SHR schedule testsSimon Pilgrim2017-12-111-3/+972
| | | | llvm-svn: 320371
* [X86] Add RCL/RCR schedule testsSimon Pilgrim2017-12-111-2/+732
| | | | llvm-svn: 320370
* [Hexagon] Crash in instruction selection for insert_vector_elt for HVXKrzysztof Parzyszek2017-12-112-1/+24
| | | | | | | | A wrong type was passed to insertVector, causing an out-of-bounds value to be added an an operand to HexagonISD::INSERT. This later failed in instruction selection. llvm-svn: 320369
* [PowerPC] Sign-extend negative constant storesNemanja Ivanovic2017-12-113-10/+10
| | | | | | | | | | | | | Second part of https://reviews.llvm.org/D40348. Revision r318436 has extended all constants feeding a store to 64 bits to allow for CSE on the SDAG. However, negative constants were zero extended which made the constant being loaded appear to be a positive value larger than 16 bits. This resulted in long sequences to materialize such constants rather than simply a "load immediate". This patch just sign-extends those updated constants so that they remain 16-bit signed immediates if they started out that way. llvm-svn: 320368
* Add a StringList constructor to Args classPavel Labath2017-12-114-1/+18
| | | | | | | | | Host::GetEnvironment returns a StringList, but the interface for launching a process takes Args. The fact that we use two classes for representing an environment is not ideal, but for now we should at least have an easy way to convert between the two. llvm-svn: 320366
* [DAGCombiner] Add combined indexed load to the work listNemanja Ivanovic2017-12-111-0/+1
| | | | | | | | | | This commit is the first part of https://reviews.llvm.org/D40348. In order to allow target combines to be performed on newly combined indexed loads, add them back to the worklist. The remainder of the above patch will be committed in subsequent revisions and will use this. Test cases will be included with those follow-up commits. llvm-svn: 320365
* [libcxx] Define istream_iterator equality comparison operators out-of-lineRoger Ferrer Ibanez2017-12-112-4/+29
| | | | | | | | | | | | | | | | | Currently libc++ defines operator== and operator!= as friend functions in the definition of the istream_iterator class template. Such definition has a subtle difference from an out-of-line definition required by the C++ Standard: these functions can only be found by argument-dependent lookup, but not by qualified lookup. This patch changes the definition, so that it conforms to the C++ Standard and adds a check involving qualified lookup to the test suite. Patch contributed by Mikhail Maltsev. Differential Revision: https://reviews.llvm.org/D40415 llvm-svn: 320363
* [ARM GlobalISel] Add test for a MOVTi16 pattern. NFCDiana Picus2017-12-111-0/+31
| | | | | | Add test for matching an OR with 0xFFFF0000 to a MOVTi16. llvm-svn: 320362
* [X86] Add fsgsbase schedule tests.Simon Pilgrim2017-12-112-6/+411
| | | | llvm-svn: 320361
* [ScopBuilder] Split statements on encountering store instructions.Michael Kruse2017-12-113-5/+73
| | | | | | | | | | Introduce -polly-stmt-granularity=store option. Contributed-by: Nandini Singhal <cs15mtech01004@iith.ac.in> Differential Revision: https://reviews.llvm.org/D37337 llvm-svn: 320360
* [RISCV] Add custom CC_RISCV calling convention and improved call supportAlex Bradbury2017-12-1110-49/+1871
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The TableGen-based calling convention definitions are inflexible, while writing a function to implement the calling convention is very straight-forward, and allows difficult cases to be handled more easily. With this patch adds support for: * Passing large scalars according to the RV32I calling convention * Byval arguments * Passing values on the stack when the argument registers are exhausted The custom CC_RISCV calling convention is also used for returns. This patch also documents the ABI lowering that a language frontend is expected to perform. I would like to work to simplify these requirements over time, but this will require further discussion within the LLVM community. We add PendingArgFlags CCState, as a companion to PendingLocs. The PendingLocs vector is used by a number of backends to handle arguments that are split during legalisation. However CCValAssign doesn't keep track of the original argument alignment. Therefore, add a PendingArgFlags vector which can be used to keep track of the ISD::ArgFlagsTy for every value added to PendingLocs. Differential Revision: https://reviews.llvm.org/D39898 llvm-svn: 320359
* [RISCV] Allow lowering of dynamic_stackalloc, stacksave, stackrestoreAlex Bradbury2017-12-112-0/+70
| | | | llvm-svn: 320358
OpenPOWER on IntegriCloud