summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* [Remarks] Add support for serializing metadata for every remark streamerFrancis Visoiu Mistrih2019-07-246-135/+166
| | | | | | | This allows every serializer format to implement metaSerializer() and return the corresponding meta serializer. llvm-svn: 366946
* [InstCombine] Teach foldOrOfICmps to allow icmp eq MIN_INT/MAX to be part of ↵Craig Topper2019-07-242-36/+59
| | | | | | | | | | | | | | | a range comparision. Similar for foldAndOfICmps We can treat icmp eq X, MIN_UINT as icmp ule X, MIN_UINT and allow it to merge with icmp ugt X, C. Similar for the other constants. We can do simliar for icmp ne X, (U)INT_MIN/MAX in foldAndOfICmps. And we already handled UINT_MIN there. Fixes PR42691. Differential Revision: https://reviews.llvm.org/D65017 llvm-svn: 366945
* [LLD] Do not print additional newlines after reaching error limitAlexander Richardson2019-07-242-1/+26
| | | | | | | | | | | | | | | | | | | | Summary: This could previously happen if errors that are emitted after reaching the error limit. In that case, the flag inside the newline() function will be set to true which causes the next call to print a newline even though the actual message will be discarded. Reviewers: ruiu, grimar, MaskRay, espindola Reviewed By: ruiu Subscribers: emaste, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D65198 llvm-svn: 366944
* [AArch64][GlobalISel] Fix a crash during s128 G_ICMP legalization due to ↵Amara Emerson2019-07-242-4/+44
| | | | | | | | | | | r366317. r366317 added a legalization for s128 G_ICMP narrow scalar which tried to hard code the result type of the new legalized G_SELECT. Change this to instead use type of the original G_ICMP result and allow the target to legalize it if necessary later. llvm-svn: 366943
* Let CorrelatedValuePropagation preserve LazyValueInfoDavid Bolvansky2019-07-241-0/+2
| | | | | | | | | | | | | | | | | | | | | Summary: This patch makes CorrelatedValuePropagation preserve LazyValueInfo by adding LazyValueInfo::eraseValue & calling it whenever an instruction is erased. Passes `make check` , test-suite, and SPECrate 2017. Patch by aqjune (Juneyoung Lee) Reviewers: reames, mzolotukhin Reviewed By: reames Subscribers: xbolva00, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D59349 llvm-svn: 366942
* Fix exporting SARIF files from scan-build on Windows.Aaron Ballman2019-07-241-2/+2
| | | | | | | | In Perl, -z is defined as checking if a "file has zero size" and makes no mention what it does when given a directory. It looks like the behavior differs across platforms, which is why on Windows the SARIF file was always being deleted. Patch by Joe Ranieri. llvm-svn: 366941
* [Remarks][NFC] Rename remarks::Serializer to remarks::RemarkSerializerFrancis Visoiu Mistrih2019-07-248-38/+40
| | | | llvm-svn: 366939
* [AMDGPU] Increase kernel paddingStanislav Mekhanoshin2019-07-242-37/+4
| | | | | | | | | | To support prefetch mode 3 we need to pad current cacheline and fill 3 cachelines after. Current padding is only sufficient for mode 2. Differential Revision: https://reviews.llvm.org/D65236 llvm-svn: 366938
* Revert "[yaml2obj] - Allow custom fields for the SHT_UNDEF sections."JF Bastien2019-07-242-89/+55
| | | | | | | It fails on macOS with the following error: https://reviews.llvm.org/D65140#1599522 llvm-svn: 366937
* [Logging] Replace Log::Printf with LLDB_LOG macro (NFC)Jonas Devlieghere2019-07-24190-5934/+5364
| | | | | | | | | | | | | | | | | | | | | | | | | | This patch replaces explicit calls to log::Printf with the new LLDB_LOGF macro. The macro is similar to LLDB_LOG but supports printf-style format strings, instead of formatv-style format strings. So instead of writing: if (log) log->Printf("%s\n", str); You'd write: LLDB_LOG(log, "%s\n", str); This change was done mechanically with the command below. I replaced the spurious if-checks with vim, since I know how to do multi-line replacements with it. find . -type f -name '*.cpp' -exec \ sed -i '' -E 's/log->Printf\(/LLDB_LOGF\(log, /g' "{}" + Differential revision: https://reviews.llvm.org/D65128 llvm-svn: 366936
* Fix signed/unsigned comparison warning. NFCI.Simon Pilgrim2019-07-241-1/+1
| | | | llvm-svn: 366935
* [ARM] Rewrite how VCMP are lowered, using a single nodeDavid Green2019-07-249-260/+289
| | | | | | | | | | | | This removes the VCEQ/VCNE/VCGE/VCEQZ/etc nodes, just using two called VCMP and VCMPZ with an extra operand as the condition code. I believe this will make some combines simpler, allowing us to just look at these codes and not the operands. It also helps fill in a missing VCGTUZ MVE selection without adding extra nodes for it. Differential Revision: https://reviews.llvm.org/D65072 llvm-svn: 366934
* [DAGCombine] matchBinOpReduction - add partial reduction matchingSimon Pilgrim2019-07-244-137/+69
| | | | | | | | | | | | | | | | | | | | This patch adds support for recognizing cases where a larger vector type is being used to reduce just the elements in the lower subvector: e.g. <8 x i32> reduction pattern in a <16 x i32> vector: <4,5,6,7,u,u,u,u,u,u,u,u,u,u,u,u> <2,3,u,u,u,u,u,u,u,u,u,u,u,u,u,u> <1,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u> matchBinOpReduction returns the lower extracted subvector in such cases, assuming isExtractSubvectorCheap accepts the extraction. I've only enabled it for X86 reduction sums so far. I intend to enable it for the bitop/minmax cases in future patches, and eventually I think its worth turning it on all the time. This is mainly just a case of ensuring calls to matchBinOpReduction don't make assumptions on the vector width based on the original vector extraction. Fixes the x86 partial reduction sum cases in PR33758 and PR42023. Differential Revision: https://reviews.llvm.org/D65047 llvm-svn: 366933
* [lldb] Configure debugserver_vers.c from CMakeStefan Granitz2019-07-242-0/+4
| | | | llvm-svn: 366932
* [ARM] Disable MVE fptosi and friendsDavid Green2019-07-242-50/+165
| | | | | | | | | | The prevents us from trying to convert an i1 predicate vector to a float, or vice-versa. Better patterns are possible, which will follow in a subsequent commit. For now we just expand them. Differential Revision: https://reviews.llvm.org/D65066 llvm-svn: 366931
* [AArch64][GlobalISel] Make vector dup optimization look at last elt of ZeroVecJessica Paquette2019-07-242-1/+41
| | | | | | | | | Fix an off-by-one error which made us not look at the last element of the zero vector. This caused a miscompile in 188.ammp. Differential Revision: https://reviews.llvm.org/D65168 llvm-svn: 366930
* clang-format: Add another test like r366926Nico Weber2019-07-241-0/+1
| | | | llvm-svn: 366929
* [ARM] More MVE compare vector splat combines for ANDsDavid Green2019-07-243-9/+297
| | | | | | | | Adds some extra r register compare combines, this time for ANDs. Differential Revision: https://reviews.llvm.org/D65062 llvm-svn: 366928
* gn build: Merge r366919Nico Weber2019-07-241-0/+1
| | | | llvm-svn: 366927
* clang-format: Add a test that shows that some code I thought was dead is ↵Nico Weber2019-07-241-0/+1
| | | | | | not dead. llvm-svn: 366926
* [InstCombine] Adjusted pow-exp tests for Windows [NFC]David Bolvansky2019-07-242-12/+12
| | | | | | | | | | | | | | | | Summary: https://bugs.llvm.org/show_bug.cgi?id=42740 Reviewers: efriedma, hans Reviewed By: hans Subscribers: spatel, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D65220 llvm-svn: 366925
* [ARM] MVE compare vector splat combineDavid Green2019-07-243-0/+3970
| | | | | | | | | MVE VCMP instructions can use a general purpose register as the second operand. This adds the combines for it, selecting from a compare of a vdup. Differential Revision: https://reviews.llvm.org/D65061 llvm-svn: 366924
* [llvm-objdump] Emit warning if --start-address/--stop-address specify range ↵Yuanfang Chen2019-07-242-0/+237
| | | | | | | | | | | | | | | | | outside file's address range. NB: the warning is about the input file itself regardless of the options used such as `-r`, `-s` etc.. https://bugs.llvm.org/show_bug.cgi?id=41911 Reviewers: jhenderson, grimar, MaskRay, rupprecht Reviewed by: MaskRay, jhenderson Differential Revision: https://reviews.llvm.org/D64779 llvm-svn: 366923
* [SelectionDAG] makeEquivalentMemoryOrdering - early out for equal chains ↵Simon Pilgrim2019-07-242-1/+35
| | | | | | | | | | (PR42727) If we are already using the same chain for the old/new memory ops then just return. Fixes PR42727 which had getLoad() reusing an existing node. llvm-svn: 366922
* [AMDGPU][MC][GFX10] Enabled GFX10 assembly with arbitrary wavesize assumed ↵Dmitry Preobrazhensky2019-07-242-2/+240
| | | | | | | | | | by the code Reviewers: rampitec, arsenm Differential Revision: https://reviews.llvm.org/D65216 llvm-svn: 366921
* [ARM] Better OR's for MVE comparesDavid Green2019-07-247-172/+222
| | | | | | | | | | | This adds a DeMorgan combine for OR's of compares to turn them into AND's, helping prevent them from going into and out of gpr registers. It also fills in the VCLE and VCLT nodes that MVE can select, allowing it to invert more compares. Differential Revision: https://reviews.llvm.org/D65059 llvm-svn: 366920
* [Remarks] Simplify the creation of remark serializersFrancis Visoiu Mistrih2019-07-248-26/+134
| | | | | | | Introduce two new functions to create a serializer, and add support for more combinations to the YAMLStrTabSerializer. llvm-svn: 366919
* [scudo][standalone] Optimization passKostya Kortchinsky2019-07-2414-94/+91
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This introduces a bunch of small optimizations with the purpose of making the fastpath tighter: - tag more conditions as `LIKELY`/`UNLIKELY`: as a rule of thumb we consider that every operation related to the secondary is unlikely - attempt to reduce the number of potentially extraneous instructions - reorganize the `Chunk` header to not straddle a word boundary and use more appropriate types Note that some `LIKELY`/`UNLIKELY` impact might be less obvious as they are in slow paths (for example in `secondary.cc`), but at this point I am throwing a pretty wide net, and it's consistant and doesn't hurt. This was mosly done for the benfit of Android, but other platforms benefit from it too. An aarch64 Android benchmark gives: - before: ``` BM_youtube/min_time:15.000/repeats:4/manual_time_mean 445244 us 659385 us 4 BM_youtube/min_time:15.000/repeats:4/manual_time_median 445007 us 658970 us 4 BM_youtube/min_time:15.000/repeats:4/manual_time_stddev 885 us 1332 us 4 ``` - after: ``` BM_youtube/min_time:15.000/repeats:4/manual_time_mean 415697 us 621925 us 4 BM_youtube/min_time:15.000/repeats:4/manual_time_median 415913 us 622061 us 4 BM_youtube/min_time:15.000/repeats:4/manual_time_stddev 990 us 1163 us 4 ``` Additional since `-Werror=conversion` is enabled on some platforms we are built on, enable it upstream to catch things early: a few sign conversions had slept through and needed additional casting. Reviewers: hctim, morehouse, eugenis, vitalybuka Reviewed By: vitalybuka Subscribers: srhines, mgorny, javed.absar, kristof.beyls, delcypher, #sanitizers, llvm-commits Tags: #llvm, #sanitizers Differential Revision: https://reviews.llvm.org/D64664 llvm-svn: 366918
* [AMDGPU] Add all vgpr classes to asm parserStanislav Mekhanoshin2019-07-243-3/+10
| | | | | | Differential Revision: https://reviews.llvm.org/D65158 llvm-svn: 366917
* AMDGPU: Fix test after r366913Matt Arsenault2019-07-241-20/+5
| | | | llvm-svn: 366916
* AMDGPU/GlobalISel: Don't assume instruction can be erased when selecting extsMatt Arsenault2019-07-242-15/+27
| | | | | | | The G_ANYEXT handling can end up reaching selectCOPY, which mutates the instruction in place. llvm-svn: 366915
* [SDAG] convert (sub x, 1) to (add x, -1) in ctpop expansion; NFCSanjay Patel2019-07-241-3/+3
| | | | | | We canonicalize to the add form, so create that directly for efficiency. llvm-svn: 366914
* AMDGPU: Only allow FP types for format buffer intrinicsMatt Arsenault2019-07-241-22/+22
| | | | | | The code already somewhat assumes this is the case anyway. llvm-svn: 366913
* [AIX][lit] Don't depend on psutil on AIXDavid Tenty2019-07-247-59/+98
| | | | | | | | | | | | | | | | | | | | | | | | | Summary: On AIX psutil can run into problems with permissions to read the process tree, which causes problems for python timeout tests which need to kill off a test and it's children. This patch adds a workaround by invoking shell via subprocess and using a platform specific option to ps to list all the descendant processes so we can kill them. We add some checks so lit can tell whether timeout tests are supported with out exposing whether we are utilizing the psutil implementation or the alternative. Reviewers: hubert.reinterpretcast, andusy, davide, delcypher Reviewed By: delcypher Subscribers: davide, delcypher, christof, lldb-commits, libcxx-commits, llvm-commits Tags: #lldb, #libc, #llvm Differential Revision: https://reviews.llvm.org/D64251 llvm-svn: 366912
* [Support] Fix `-ftime-trace-granularity` optionAnton Afanasyev2019-07-2410-14/+33
| | | | | | | | | | | | | | | | Summary: Move `-ftime-trace-granularity` option to frontend options. Without patch this option is showed up in the help for any tool that links libSupport. Reviewers: sammccall Subscribers: hiraditya, cfe-commits, llvm-commits Tags: #clang, #llvm Differential Revision: https://reviews.llvm.org/D65202 llvm-svn: 366911
* [ARM] Better AND's for MVE comparesDavid Green2019-07-242-96/+63
| | | | | | | | | | | | Add a number of folds to convert and(vcmp, vcmp) into a single VPT block, where the second vcmp becomes predicated on the first. The VCMP; VPST; VCMP will eventually be converted to VPT; VCMP in the VPTBlockPass. Differential Revision: https://reviews.llvm.org/D65058 llvm-svn: 366910
* [ARM] MVE floating point compares and selectsDavid Green2019-07-245-1/+6743
| | | | | | | | | | | | | Much like integers, this adds MVE floating point compares and select. It requires a lot more buildvector/shuffle code because we may need to expand the compares without mve.fp, and requires support for and/or because of the way we lower llvm condition codes. Some original code by David Sherwood Differential Revision: https://reviews.llvm.org/D65054 llvm-svn: 366909
* [llvm-ar][test] Fix move operation testsOwen Reynolds2019-07-242-17/+17
| | | | | | | This fixes two tests that did not remove existing archives before testing due to mistyped archive names. llvm-svn: 366908
* [ARM] Basic And/Or/Xor handling for MVE predicatesDavid Green2019-07-245-0/+2090
| | | | | | | | | | | This adds some basic, "worst case" handling for MVE predicate Or/And/Xor. It does this by going into and out of GPRs, doing the operation on scalars. Code by David Sherwood. Differential Revision: https://reviews.llvm.org/D65053 llvm-svn: 366907
* Silence a conversion warning after r366887. NFCPaul Robinson2019-07-241-2/+2
| | | | llvm-svn: 366906
* [ARM] Make sure that the constant pool does not keep in the middle of an IT ↵Simi Pallipurath2019-07-242-3/+133
| | | | | | | | | | | | | | | | | | block. This change make sure that llvm does not emit an invalid IT block by putting the constant pool in the middle of an IT block. We have code to try to avoid putting a constant island in the middle of an IT block, but it only works if we see an IT between the one currently referencing CPE and possible insertion point. If the first instruction we look at is the VLDRD after the IT , we never see the IT and does not realize that the instruction doing the load could be in an IT block itself. Differential Revision: https://reviews.llvm.org/D64621 Change-Id: I24cecb37cded75e8992870bd997f6226853bd920 llvm-svn: 366905
* Test commit. NFC.Sjoerd Meijer2019-07-242-2/+2
| | | | | | | Removed 2 trailing whitespaces in 2 files that used to be in different repos to test my new github monorepo workflow. llvm-svn: 366904
* Fix @skipIfSanitized decoratorPavel Labath2019-07-241-2/+4
| | | | | | | To run the test the decorator function should return None, not False. Returning anything other than None skips the test. llvm-svn: 366903
* [InstSimplify] Rename SimplifyFPUnOp and SimplifyFPBinOpJay Foad2019-07-244-27/+23
| | | | | | | | | | | | | | | | | | | | | | Summary: SimplifyFPBinOp is a variant of SimplifyBinOp that lets you specify fast math flags, but the name is misleading because both functions can simplify both FP and non-FP ops. Instead, overload SimplifyBinOp so that you can optionally specify fast math flags. Likewise for SimplifyFPUnOp. Reviewers: spatel Reviewed By: spatel Subscribers: xbolva00, cameron.mcinally, eraman, hiraditya, haicheng, zzheng, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D64902 llvm-svn: 366902
* [InstCombine] add tests for load narrowing; NFCSanjay Patel2019-07-241-7/+43
| | | | | | Baseline results for D64432. llvm-svn: 366901
* [clangd] Add categories to help options, and only show clangd options.Sam McCall2019-07-241-190/+232
| | | | | | | | | | | | | | | | | | | Summary: Restricting the categories prevents extra unwanted options from creeping into help (D60663), and removes a bunch of noise from --help-hidden. While here, remove `static` from the opts in favor of an anon namespace, to reduce the noise level. Reviewers: hokein Subscribers: ilya-biryukov, MaskRay, jkorous, arphaman, kadircet, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D65200 llvm-svn: 366900
* [FileCheck] Use ASSERT for fatal unit testsThomas Preud'homme2019-07-241-43/+45
| | | | | | | | | | | | | | | | | | | | Summary: A number of EXPECT statements in FileCheck's unit tests are dependent from results of other values being tested. This commit changes those earlier test to use ASSERT instead of EXPECT to avoid cascade errors when they are all related to the same issue. Reviewers: jhenderson, chandlerc, jdenny, probinson, grimar, arichardson, rnk Subscribers: JonChesterfield, rogfer01, hfinkel, kristina, rnk, tra, arichardson, grimar, dblaikie, probinson, llvm-commits, hiraditya Tags: #llvm Differential Revision: https://reviews.llvm.org/D64921 > llvm-svn: 366862 llvm-svn: 366899
* [FileCheck]] Canonicalize caret location testingThomas Preud'homme2019-07-245-80/+81
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Testing of caret location in diagnostic message is currently made with CHECK directive with the following general format: CHECK: {{^ \^$}} James Henderson suggested the following would be more readable: CHECK: {{^}} ^{{$}} and when whole lines can be matched (as is the case for command-line testing where error messages do not include path): CHECK: ^ using the option --match-full-lines. This commit implements these 2 changes on all existing caret position tests. It also aligns the caret to the character it is trying to match in the above line. Reviewers: jhenderson, chandlerc, jdenny, probinson, grimar, arichardson, rnk Subscribers: JonChesterfield, rogfer01, hfinkel, kristina, rnk, tra, arichardson, grimar, dblaikie, probinson, llvm-commits, hiraditya Tags: #llvm Differential Revision: https://reviews.llvm.org/D64923 > llvm-svn: 366861 llvm-svn: 366898
* FileCheck [8/12]: Define numeric var from exprThomas Preud'homme2019-07-247-251/+475
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This patch is part of a patch series to add support for FileCheck numeric expressions. This specific patch lift the restriction for a numeric expression to either be a variable definition or a numeric expression to try to match. This commit allows a numeric variable to be set to the result of the evaluation of a numeric expression after it has been matched successfully. When it happens, the variable is allowed to be used on the same line since its value is known at match time. It also makes use of this possibility to reuse the parsing code to parse a command-line definition by crafting a mirror string of the -D option with the equal sign replaced by a colon sign, e.g. for option '-D#NUMVAL=10' it creates the string '-D#NUMVAL=10 (parsed as [[#NUMVAL:10]])' where the numeric expression is parsed to define NUMVAL. This result in a few tests needing updating for the location diagnostics on top of the tests for the new feature. It also enables empty numeric expression which match any number without defining a variable. This is done here rather than in commit #5 of the patch series because it requires to dissociate automatic regex insertion in RegExStr from variable definition which would make commit #5 even bigger than it already is. Copyright: - Linaro (changes up to diff 183612 of revision D55940) - GraphCore (changes in later versions of revision D55940 and in new revision created off D55940) Reviewers: jhenderson, chandlerc, jdenny, probinson, grimar, arichardson, rnk Subscribers: hiraditya, llvm-commits, probinson, dblaikie, grimar, arichardson, tra, rnk, kristina, hfinkel, rogfer01, JonChesterfield Tags: #llvm Differential Revision: https://reviews.llvm.org/D60388 > llvm-svn: 366860 llvm-svn: 366897
* [llvm-objdump] - Import the test/Object/X86/no-start-symbol.test test case ↵George Rimar2019-07-243-10/+28
| | | | | | | | | | | | | | and rewrite it to use YAML. This patch removes test/Object/X86/no-start-symbol.test (rewrites it to use YAML and moves it to llvm-objdump tests folder). (This test was initially introduced in rL239039, but now there is no reason to keep the precompiled binary it seems). DIfferential revision: https://reviews.llvm.org/D65136 llvm-svn: 366896
OpenPOWER on IntegriCloud