summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* [clangd] Reorder source files in CMakeListsKadir Cetinkaya2019-04-151-1/+1
| | | | llvm-svn: 358373
* [SelectionDAG] Use KnownBits::computeForAddSub/computeForAddCarryBjorn Pettersson2019-04-153-68/+72
| | | | | | | | | | | | | | | | | | | | | | | | | Summary: Use KnownBits::computeForAddSub/computeForAddCarry in SelectionDAG::computeKnownBits when doing value tracking for addition/subtraction. This should improve the precision of the known bits, as we only used to make a simple estimate of known zeroes. The KnownBits support functions are also able to deduce bits that are known to be one in the result. Reviewers: spatel, RKSimon, nikic, lebedev.ri Reviewed By: nikic Subscribers: nikic, javed.absar, lebedev.ri, hiraditya, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D60460 llvm-svn: 358372
* [X86] Regenerate checks for domain-reassignment.mirCraig Topper2019-04-151-2/+5
| | | | | | | | Apparently there are some stray IMPLICIT_DEF operations that weren't in the checks. Not sure if they've always been there or something changed at some point. llvm-svn: 358371
* [Sparc] Fix typo. NFC.Jim Lin2019-04-151-2/+2
| | | | llvm-svn: 358370
* [GlobalISel] Enable CSE in the IRTranslator & legalizer for -O0 with ↵Amara Emerson2019-04-1552-1016/+697
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | constants only. Other opcodes shouldn't be CSE'd until we can be sure debug info quality won't be degraded. This change also improves the IRTranslator so that in most places, but not all, it creates constants using the MIRBuilder directly instead of first creating a new destination vreg and then creating a constant. By doing this, the buildConstant() method can just return the vreg of an existing G_CONSTANT instead of having to create a COPY from it. I measured a 0.2% improvement in compile time and a 0.9% improvement in code size at -O0 ARM64. Compile time: Program base cse diff test-suite...ark/tramp3d-v4/tramp3d-v4.test 9.04 9.12 0.8% test-suite...Mark/mafft/pairlocalalign.test 2.68 2.66 -0.7% test-suite...-typeset/consumer-typeset.test 5.53 5.51 -0.4% test-suite :: CTMark/lencod/lencod.test 5.30 5.28 -0.3% test-suite :: CTMark/Bullet/bullet.test 25.82 25.76 -0.2% test-suite...:: CTMark/ClamAV/clamscan.test 6.92 6.90 -0.2% test-suite...TMark/7zip/7zip-benchmark.test 34.24 34.17 -0.2% test-suite :: CTMark/SPASS/SPASS.test 6.25 6.24 -0.1% test-suite...:: CTMark/sqlite3/sqlite3.test 1.66 1.66 -0.1% test-suite :: CTMark/kimwitu++/kc.test 13.61 13.60 -0.0% Geomean difference -0.2% Code size: Program base cse diff test-suite...-typeset/consumer-typeset.test 1315632 1266480 -3.7% test-suite...:: CTMark/ClamAV/clamscan.test 1313892 1297508 -1.2% test-suite :: CTMark/lencod/lencod.test 1439504 1423112 -1.1% test-suite...TMark/7zip/7zip-benchmark.test 2936980 2904172 -1.1% test-suite :: CTMark/Bullet/bullet.test 3478276 3445460 -0.9% test-suite...ark/tramp3d-v4/tramp3d-v4.test 8082868 8033492 -0.6% test-suite :: CTMark/kimwitu++/kc.test 3870380 3853972 -0.4% test-suite :: CTMark/SPASS/SPASS.test 1434904 1434896 -0.0% test-suite...Mark/mafft/pairlocalalign.test 764528 764528 0.0% test-suite...:: CTMark/sqlite3/sqlite3.test 782092 782092 0.0% Geomean difference -0.9% Differential Revision: https://reviews.llvm.org/D60580 llvm-svn: 358369
* [GlobalISel] Introduce a CSEConfigBase class to allow targets to define ↵Amara Emerson2019-04-1513-23/+107
| | | | | | | | | | | | | | their own CSE configs. Because CodeGen can't depend on GlobalISel, we need a way to encapsulate the CSE configs that can be passed between TargetPassConfig and the targets' custom pass configs. This CSEConfigBase allows targets to create custom CSE configs which is then used by the GISel passes for the CSEMIRBuilder. This support will be used in a follow up commit to allow constant-only CSE for -O0 compiles in D60580. llvm-svn: 358368
* llvm-undname: Fix oss-fuzz-foudn crash-on-invalid with incomplete special ↵Nico Weber2019-04-142-0/+14
| | | | | | table nodes llvm-svn: 358367
* gn build: Merge r358297Nico Weber2019-04-141-0/+1
| | | | llvm-svn: 358366
* gn build: Merge r358243Nico Weber2019-04-141-0/+1
| | | | llvm-svn: 358365
* gn build: Merge r358272Nico Weber2019-04-141-0/+1
| | | | llvm-svn: 358364
* llvm-undname: Fix another crash-on-invalid found by oss-fuzzNico Weber2019-04-142-1/+9
| | | | llvm-svn: 358363
* [X86] Redefine KUNPCK instructions to take a narrower source register class ↵Craig Topper2019-04-141-11/+9
| | | | | | | | | than destination register class. Remove copies from the isel output pattern. There's no reason for the inputs to be the destination register class. This just forces an unnecessary copy in the output patterns. llvm-svn: 358362
* [X86] Put the locked mi8 instrutions above the locked mi/mi32 so they will ↵Craig Topper2019-04-141-24/+26
| | | | | | | | | be prefered. We want 64mi8 to be prefered over 64mi32. The order for 16mi/32mi doesn't really matter. llvm-svn: 358361
* [X86] Change IMUL with immediate instruction order to ri8 instructions come ↵Craig Topper2019-04-141-31/+34
| | | | | | | | | | before ri/ri32 instructions. This will ensure IMUL64ri8 is tried before IMUL64ri32. For IMUL32 and IMUL16 the order doesn't really matter because only the ri8 versions use a predicate. That automatically gives them priority. llvm-svn: 358360
* [X86] Move VPTESTM matching from the isel table to custom code in ↵Craig Topper2019-04-1415-2097/+2041
| | | | | | | | | | | | | | | | | | | | | | | | | | | | X86ISelDAGToDAG. We had many tablegen patterns for these instructions. And due to the commutability of the patterns, tablegen expands them to even more patterns. All together VPTESTMD patterns accounted for more the 50K of the 610K isel table. This had gotten bad when we stopped canonicalizing AND to vXi64. This required a pattern for every combination of bitcast input type. This change moves the matching to custom code where it is easier to look through the bitcasts without being concerned with the specific types. The test changes are because we are now stricter with one use checks as its required to make load folding legal. We now require the AND and any BITCAST to only have a single use. This prevents forming VPTESTM and a VPAND with the same inputs. We now support broadcast loads for 128/256 patterns without VLX. We'll widen to 512-bit like and still fold the broadcast since the amount of memory read doesn't change. There are a few tests that got slightly longer because are now prefering load + VPTESTM over XOR+VPCMPEQ for (seteq (load), allzeros). Previously we were able to share the XOR with multiple VPTESTM instructions. llvm-svn: 358359
* [X86] Don't form masked vpcmp/vcmp/vptestm operations if the setcc node has ↵Craig Topper2019-04-144-188/+295
| | | | | | | | | | | | | | more than one use. We're better of emitting a single compare + kand rather than a compare for the other use and a masked compare. I'm looking into using custom instruction selection for VPTESTM to reduce the ridiculous number of permutations of patterns in the isel table. Putting a one use check on all masked compare folding makes load fold matching in the custom code easier. llvm-svn: 358358
* Prevent unnecessary conversion from StringRef to C-string [NFC]Raphael Isemann2019-04-141-1/+1
| | | | | | | | | There is an alternative method to GetConstCStringWithLength that takes a StringRef. GetConstCStringWithLength also calls this method in the end, so directly calling the StringRef saves us from a unnecessary conversion to a C-string. llvm-svn: 358357
* [clang-tidy] Add MagnitudeBitsUpperLimit option to ↵Tamas Zolnai2019-04-146-21/+89
| | | | | | | | | | | | | | | | | | | | | bugprone-too-small-loop-variable Summary: The bugprone-too-small-loop-variable check often catches loop variables which can represent "big enough" values, so we don't actually need to worry about that this variable will overflow in a loop when the code iterates through a container. For example a 32 bit signed integer type's maximum value is 2 147 483 647 and a container's size won't reach this maximum value in most of the cases. So the idea of this option to allow the user to specify an upper limit (using magnitude bit of the integer type) to filter out those catches which are not interesting for the user, so he/she can focus on the more risky integer incompatibilities. Next to the option I replaced the term "positive bits" to "magnitude bits" which seems a better naming both in the code and in the name of the new option. Reviewers: JonasToth, alexfh, aaron.ballman, hokein Reviewed By: JonasToth Subscribers: Eugene.Zelenko, xazax.hun, jdoerfert, cfe-commits Tags: #clang-tools-extra, #clang Differential Revision: https://reviews.llvm.org/D59870 llvm-svn: 358356
* [c++20] Enable driver and frontend support for building and usingRichard Smith2019-04-146-12/+132
| | | | | | modules when -std=c++2a is specified. llvm-svn: 358355
* [ConstantRange] Simplify unittests after getSetSize was removedFangrui Song2019-04-141-28/+9
| | | | | | | | | | | | | | Reviewers: lebedev.ri, nikic Reviewed By: nikic Subscribers: llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D60662 llvm-svn: 358354
* [c++20] Parsing support for module-declarations, import-declarations,Richard Smith2019-04-1414-97/+460
| | | | | | | | | and the global and private module fragment. For now, the private module fragment introducer is ignored, but use of the global module fragment introducer should be properly enforced. llvm-svn: 358353
* [Mem2Reg] Delete unused PointerAllocaValuesFangrui Song2019-04-141-5/+0
| | | | | | It is unused after AliasSetTracker support was removed. llvm-svn: 358352
* [Mem2Reg] Simplify and micro optimizeFangrui Song2019-04-141-13/+9
| | | | | | | | * Rearrange continu/break * BBNumbers.lookup(A) -> BBNumbers.find(A)->second BBNumbers has been computed, thus we can assume the value exists in the predicate. llvm-svn: 358351
* [Mem2Reg] Don't call LBI.deleteValue on AllocInst/DbgVariableIntrinsicFangrui Song2019-04-141-6/+1
| | | | | | Only StoreInst/LoadInst are assigned numbers. Other types of instructions are not in LBI. llvm-svn: 358350
* [Mem2Reg] Simplify rewriteSingleStoreAllocaFangrui Song2019-04-141-5/+2
| | | | llvm-svn: 358349
* [ConstantRange] Fix unittest after rL358347Fangrui Song2019-04-141-63/+60
| | | | llvm-svn: 358348
* [ConstantRange] Delete unused getSetSizeFangrui Song2019-04-142-11/+0
| | | | | | getSetSize returns an APInt that is 1 bit wider. The APInt is typically 65-bit and requires memory allocation. isSizeStrictlySmallerThan and isSizeLargerThan are preferred. The last use of this helper method was removed by rL302385. llvm-svn: 358347
* [X86] Update bool_reduction_v8f32 test cases from vector-compare-any_of.ll ↵Craig Topper2019-04-142-38/+27
| | | | | | | | and vector-compare-all_of.ll to be proper reductions. One of the shuffles was used twice. While the intended shuffle wasn't connected. llvm-svn: 358346
* [X86] Remove some unused tablegen multiclasses. NFCCraig Topper2019-04-141-27/+0
| | | | llvm-svn: 358345
* [Tests] Add tests for D60659, and make adjustments to others to make diff clearPhilip Reames2019-04-136-31/+85
| | | | | | | | | Three related changes: 1) auto-gen several test files 2) Add the new tests at the bottom of said files 3) Adjust a couple of other test files not to use stores to constants when trying to test constexpr address handling llvm-svn: 358344
* [X86] Use PC-relative mode for the kernel code modelBill Wendling2019-04-133-22/+31
| | | | | | | | | | | | | | | | | | Summary: The Linux kernel uses PC-relative mode, so allow that when the code model is "kernel". Reviewers: craig.topper Reviewed By: craig.topper Subscribers: llvm-commits, kees, nickdesaulniers Tags: #llvm Differential Revision: https://reviews.llvm.org/D60643 llvm-svn: 358343
* [CVP] Add tests for range of with.overflow result; NFCNikita Popov2019-04-131-0/+252
| | | | | | Test range of with.overflow result in the no-overflow branch. llvm-svn: 358341
* [ConstantRange] Disallow NUW | NSW in makeGuaranteedNoWrapRegion()Nikita Popov2019-04-133-136/+16
| | | | | | | | | | | | | | | As motivated in D60598, this drops support for specifying both NUW and NSW in makeGuaranteedNoWrapRegion(). None of the users of this function currently make use of this. When both NUW and NSW are specified, the exact nowrap region has two disjoint parts and makeGNWR() returns one of them. This result doesn't seem to be useful for anything, but makes the semantics of the function fuzzier. Differential Revision: https://reviews.llvm.org/D60632 llvm-svn: 358340
* [InstCombine] Remove redundant/bogus mul_with_overflow combinesNikita Popov2019-04-131-8/+0
| | | | | | | | | | | | As pointed out in D60518 folding mulo(%x, undef) to {undef, undef} isn't correct. As a correct version of this already exists in InstructionSimplify (https://github.com/llvm-mirror/llvm/blob/bd8056ef326e075cc500f3f0cfcd1193bc200594/lib/Analysis/InstructionSimplify.cpp#L4750-L4757) this is just dead code though. Drop it together with the mul(%x, 0) -> {0, false} fold that is also already handled by InstSimplify. Differential Revision: https://reviews.llvm.org/D60649 llvm-svn: 358339
* [X86] Use int64_t and isInt<N> instead of APInt operations in ↵Craig Topper2019-04-131-8/+6
| | | | | | | | | | foldLoadStoreIntoMemOperand. NFC We know all our values are limited to 64 bits here so we don't need an APInt. This should save some generated code checking between large and small size. llvm-svn: 358338
* [CommandLineParser] Add DefaultOption flagDon Hinton2019-04-137-17/+142
| | | | | | | | | | | | | | | | | | | | | | Summary: Add DefaultOption flag to CommandLineParser which provides a default option or alias, but allows users to override it for some other purpose as needed. Also, add `-h` as a default alias to `-help`, which can be seamlessly overridden by applications like llvm-objdump and llvm-readobj which use `-h` as an alias for other options. Reviewers: alexfh, klimek Reviewed By: klimek Subscribers: MaskRay, mehdi_amini, inglorion, dexonsmith, hiraditya, llvm-commits, jhenderson, arphaman, cfe-commits Tags: #clang, #llvm Differential Revision: https://reviews.llvm.org/D59746 llvm-svn: 358337
* [WebAssembly] Use Function::hasOptSize() (NFC)Heejin Ahn2019-04-131-2/+1
| | | | | | | | | | | | | | | | Summary: Use member function. Reviewers: aheejin Subscribers: sunfish, hiraditya, sbc100, jgravelle-google, dschuff, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D60651 Patch by Hideto Ueno (uenoku) llvm-svn: 358336
* [CallingConvLower] Use SmallVectorImpl::swapFangrui Song2019-04-131-1/+1
| | | | llvm-svn: 358335
* [Mem2Reg] Delete unused AllocaPointerValFangrui Song2019-04-131-4/+0
| | | | | | It is no longer used after the AliasSetTracker updating logic was removed. llvm-svn: 358334
* [clang-tidy] Use back-tick hereTamas Zolnai2019-04-131-2/+2
| | | | llvm-svn: 358333
* [ADT] Fix OwningArrayRef's move ctorFangrui Song2019-04-132-1/+8
| | | | llvm-svn: 358332
* [CVP] Fix inverted predicates in test; NFCNikita Popov2019-04-131-8/+8
| | | | | | | Checked the wrong direction in the umul tests... fix predicated to line up with the test name. llvm-svn: 358331
* [CVP] Add tests for with.overflow used as condition; NFCNikita Popov2019-04-131-0/+474
| | | | llvm-svn: 358330
* [lldb] [lit/SymbolFile] Avoid -nostdlib in target-symbols-add-unwind.testMichal Gorny2019-04-132-6/+6
| | | | | | | | | | | | | Do not use -nostdlib in target-symbols-add-unwind.test. NetBSD uses startup files to provide obligatory ELF notes in executables, and therefore using -nostdlib requires providing specially tailored input. Otherwise, kernel rejects the result as invalid executable. The replacement was suggested by Pavel Labath. Differential Revision: https://reviews.llvm.org/D60648 llvm-svn: 358329
* [InstCombine] Canonicalize (-X srem Y) to -(X srem Y).Chen Zheng2019-04-132-4/+9
| | | | | | Differential Revision: https://reviews.llvm.org/D60647 llvm-svn: 358328
* [InstCombine] [NFC] add testcases for canonicalizing (-X srem Y) to -(X srem Y).Chen Zheng2019-04-131-0/+63
| | | | llvm-svn: 358327
* [verify] Add support for location markers in directives.Richard Smith2019-04-135-145/+334
| | | | | | | | | | | | | | | A marker (matching /#[A-Za-z0-9_-]/) is specified by attaching a comment containing the marker to the line at which the diagnostic is expected, and then can be referenced from an expected-* directive after an @: foo // #1 // expected-error@#1 {{undeclared identifier 'foo'}} The intent is for markers to be used in situations where relative line numbers are currently used, to avoid the need to renumber when the test case is rearranged. llvm-svn: 358326
* [StackMaps] Update llvm-readobj to parse V3 StackmapsPhilip Reames2019-04-133-43/+43
| | | | | | | | | | | This updates the StackMap parser in the llvm-readobj tool to parse version 3 StackMaps, which were bumped in https://reviews.llvm.org/D32629. Version 3 StackMaps differ in that they have a uint16 sized "location size" field which was added to the Location block in a StackMap record. The record has additional padding for alignment. This was a backwards incompatible change resulting in a StackMap version bump. Patch By: jacob.hughes@kcl.ac.uk (with a rewrite of tests by me) Differential Revision: https://reviews.llvm.org/D59020 llvm-svn: 358325
* [StackMaps] Add location size to llvm-readobj -stackmap outputPhilip Reames2019-04-133-73/+73
| | | | | | | | | | | | | | | | The size field of a location can be different for each entry, so it is useful to have this displayed in the output of llvm-readobj -stackmap. Below is an example of how the output would look: Record ID: 2882400000, instruction offset: 16 3 locations: #1: Constant 1, size: 8 #2: Constant 2, size: 8 #3: Constant 3, size: 8 0 live-outs: [ ] Patch By: jacob.hughes@kcl.ac.uk (with heavy modification by me) Differential Revision: https://reviews.llvm.org/D59169 llvm-svn: 358324
* [llvm-readobj] Minor style tweak for consistency sake [NFC]Philip Reames2019-04-132-4/+4
| | | | llvm-svn: 358323
OpenPOWER on IntegriCloud