summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* [Sema] Enable -Wimplicit-float-conversion for integral to floating point ↵Ziang Wan2019-07-256-10/+98
| | | | | | | | | | | | | | | precision loss Issue an warning when the code tries to do an implicit int -> float conversion, where the float type ha a narrower significant than the float type. The new warning is controlled by flag -Wimplicit-int-float-conversion, under -Wimplicit-float-conversion and -Wconversion. Differential Revision: https://reviews.llvm.org/D64666 llvm-svn: 366972
* [llvm-lipo] Implement alignment function in -createShoaib Meenai2019-07-255-4/+503
| | | | | | | | | | | Summary: Removes hard coded valuse for alignment in -create. Patch by Anusha Basana <anusha.basana@gmail.com> Differential Revision: https://reviews.llvm.org/D64871 llvm-svn: 366970
* [Object] Add public MaxSectionAlignment to MachOUniversalShoaib Meenai2019-07-252-6/+9
| | | | | | | | | | | Change MAXSECTALIGN to a public MaxSectionAlignment in MachOUniversal. Will be used in a follow-up. Patch by Anusha Basana <anusha.basana@gmail.com> Differential Revision: https://reviews.llvm.org/D65117 llvm-svn: 366969
* [llvm-lipo] Add test for -verify_archsShoaib Meenai2019-07-251-0/+1
| | | | | | | | | | | Add test to verify clean failure, exit code 1 for valid architecture not present in the universal binary. Patch by Anusha Basana <anusha.basana@gmail.com> Differential Revision: https://reviews.llvm.org/D65251 llvm-svn: 366968
* [sanitizer_common] Allow customization of StartSymbolizerSubprocessJulian Lettner2019-07-252-7/+13
| | | | | | | | | | | | | | Summary: Make SymbolizerProcess::StartSymbolizerSubprocess virtual and protected to allow subclasses to customize it via "override and call". Subscribers: kubamracek, #sanitizers, llvm-commits Tags: #sanitizers, #llvm Differential Revision: https://reviews.llvm.org/D65252 llvm-svn: 366967
* [FileCollector] Change coding style from LLDB to LLVM (NFC)Jonas Devlieghere2019-07-256-110/+107
| | | | | | | | This patch changes the coding style of the FileCollector from the LLDB to the LLVM coding style. Alex recently lifted it into LLVM and I volunteered to do the conversion. llvm-svn: 366966
* [Remarks][NFC] Rename remarks::Parser to remarks::RemarkParserFrancis Visoiu Mistrih2019-07-256-28/+28
| | | | llvm-svn: 366965
* [docs] Split out a section on LoopInfo in the new loop documentationPhilip Reames2019-07-241-6/+37
| | | | llvm-svn: 366964
* [ARM] Remove dead code from ARMConstantIslands.Eli Friedman2019-07-241-5/+0
| | | | | | | tLDRHi is not a pc-relative load; it can't directly refer to a constant pool or jump table. llvm-svn: 366963
* [InstCombine] Swap order of checks to improve compile time (NFC)Evandro Menezes2019-07-241-3/+3
| | | | llvm-svn: 366962
* Apply a few more reviewer suggestions from D65164Philip Reames2019-07-241-6/+11
| | | | llvm-svn: 366961
* Define some basic terminology around loops in our documentationPhilip Reames2019-07-242-0/+113
| | | | | | | | | | | | I've noticed a lot of confusion around this area recently with key terms being misused in a number of threads. To help reign that in, let's go ahead and document the current terminology and meaning thereof. My hope is to grow this over time into a broader discussion of canonical loop forms - yes, there are more than one ... many more than one - but for the moment, simply having the key terminology is a good stopping place. Note: I am landing this *without* an LGTM. All feedback so far has been positive, and trying to apply all of the suggested changes/extensions would cause the review to never end. Instead, I decided to land it with the obvious fixes made based on reviewer comments, then iterate from there. Differential Revision: https://reviews.llvm.org/D65164 llvm-svn: 366960
* [AArch64][GlobalISel] Select immediate modes for ADD when selecting G_GEPJessica Paquette2019-07-243-10/+87
| | | | | | | | | | | | | | | Before, we weren't able to select things like this for G_GEP: add x0, x8, #8 And instead we'd materialize the 8. This teaches GISel to do that. It gives some considerable code size savings on 252.eon-- about 4%! Differential Revision: https://reviews.llvm.org/D65248 llvm-svn: 366959
* Fix unittest build issue in r366956Alex Lorenz2019-07-241-0/+1
| | | | | | | I marked the fields as private, but they're needed by the unittest. I'll have to fix that up separarely in a follow-up. llvm-svn: 366958
* [AArch64][GlobalISel] Don't try to use GISel if subtarget doesn't have neon ↵Amara Emerson2019-07-242-0/+19
| | | | | | | | | | | | | | or fp. Throughout the legalizerinfo we currently make the assumption that the target has neon and FP target features available. Fixing it will require a refactor of the whole thing, so until then make sure we fall back. Works around PR42734 Differential Revision: https://reviews.llvm.org/D65244 llvm-svn: 366957
* [Support] move FileCollector from LLDB to llvm/SupportAlex Lorenz2019-07-248-80/+110
| | | | | | | | | The file collector class is useful for creating reproducers, not just for LLDB, but for other tools as well in LLVM/Clang. Differential Revision: https://reviews.llvm.org/D65237 llvm-svn: 366956
* [Codegen] (X & (C l>>/<< Y)) ==/!= 0 --> ((X <</l>> Y) & C) ==/!= 0 foldRoman Lebedev2019-07-2416-1500/+1330
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This was originally reported in D62818. https://rise4fun.com/Alive/oPH InstCombine does the opposite fold, in hope that `C l>>/<< Y` expression will be hoisted out of a loop if `Y` is invariant and `X` is not. But as it is seen from the diffs here, if it didn't get hoisted, the produced assembly is almost universally worse. Much like with my recent "hoist add/sub by/from const" patches, we should get almost universal win if we hoist constant, there is almost always an "and/test by imm" instruction, but "shift of imm" not so much, so we may avoid having to materialize the immediate, and thus need one less register. And since we now shift not by constant, but by something else, the live-range of that something else may reduce. Special care needs to be applied not to disturb x86 `BT` / hexagon `tstbit` instruction pattern. And to not get into endless combine loop. Reviewers: RKSimon, efriedma, t.p.northover, craig.topper, spatel, arsenm Reviewed By: spatel Subscribers: hiraditya, MaskRay, wuzish, xbolva00, nikic, nemanjai, jvesely, wdng, nhaehnle, javed.absar, tpr, kristof.beyls, jsji, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D62871 llvm-svn: 366955
* [AArch64][GlobalISel] Fold G_MUL into XRO load addressing mode when possibleJessica Paquette2019-07-242-9/+216
| | | | | | | | | | | | If we have a G_MUL, and either the LHS or the RHS of that mul is the legal shift value for a load addressing mode, we can fold it into the load. This gives some code size savings on some SPEC tests. The best are around 2% on 300.twolf and 3% on 254.gap. Differential Revision: https://reviews.llvm.org/D65173 llvm-svn: 366954
* Revert "NFC: utils/perf-training: Python 3 compatibility for lit.cfg"Azharuddin Mohammed2019-07-241-1/+1
| | | | | | | | | This reverts commit 9178b10163f758cbf8a5290ea6a827990427ddc0 (r365969). We are back to using Python2 and this is failing. This should instead be made to be compatible with both Python 2 and 3. llvm-svn: 366953
* IR: Teach GlobalIndirectSymbol::getBaseObject() to handle more kinds of ↵Peter Collingbourne2019-07-244-5/+51
| | | | | | | | | | | | | | | | | | | | | expressions. For aliases, any expression that lowers at the MC level to global_object or global_object+constant is valid at the object file level. getBaseObject() should return a result if the aliasee ends up being of that form even if the IR used to produce it is somewhat unconventional. Note that this is different from what stripInBoundsOffsets() and that family of functions is doing. Those functions are concerned about semantic properties of IR, whereas here we only care about the lowering result. Therefore reimplement getBaseObject() in a way that matches the lowering result. This fixes a crash when producing a summary for aliases such as that in the included test case. Differential Revision: https://reviews.llvm.org/D65115 llvm-svn: 366952
* [GlobalISel] Support for inlining memcpy, memset and memmove calls.Amara Emerson2019-07-2411-6/+1126
| | | | | | | | | | | | | This introduces a new family of combiner helper routines that re-use the target specific cost model from SelectionDAG, and generate inline implementations of the memcpy family of intrinsics. The combines are only enabled at optimization levels higher than -O0, and give very substantial performance improvements. Differential Revision: https://reviews.llvm.org/D65167 llvm-svn: 366951
* [Symbol] Fix some botched logic in Variable::GetLanguageAlex Langford2019-07-241-5/+5
| | | | | | | | | | | | | | Summary: I messed up the logic for this. Fixing with some improvements suggested by Pavel. Reviewers: labath, jdoerfert Subscribers: lldb-commits Differential Revision: https://reviews.llvm.org/D65165 llvm-svn: 366950
* [Transforms] move copying of load metadata to helper function; NFCSanjay Patel2019-07-243-45/+56
| | | | | | | There's another proposed load combine that can make use of this code in D64432. llvm-svn: 366949
* [WebAssembly] Set __tls_align to 1 when there is no TLSGuanzhong Chen2019-07-242-5/+47
| | | | | | | | | | | | | | | | | | Summary: We want the tool conventions to state that `__tls_align` will be a power of 2. It makes sense to not have an exception for when there is no TLS. Reviewers: tlively, sunfish Reviewed By: tlively Subscribers: dschuff, sbc100, jgravelle-google, aheejin, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D65177 llvm-svn: 366948
* [CodeGen] Add missing comment (NFC)Evandro Menezes2019-07-241-14/+19
| | | | | | | Add similar comments on the load limits pertaining to `memcmp()` similar to those for other string functions. llvm-svn: 366947
* [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
OpenPOWER on IntegriCloud