summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* [examples] Fix some comments in the LLJITWithJITLink exampleLang Hames2019-10-181-2/+2
| | | | llvm-svn: 375269
* AMDGPU: Relax 32-bit SGPR register classMatt Arsenault2019-10-18104-914/+974
| | | | | | | | | | | Mostly use SReg_32 instead of SReg_32_XM0 for arbitrary values. This will allow the register coalescer to do a better job eliminating copies to m0. For GlobalISel, as a terrible hack, use SGPR_32 for things that should use SCC until booleans are solved. llvm-svn: 375267
* [examples] Add an example of how to use JITLink and small-code-model with LLJIT.Lang Hames2019-10-183-0/+82
| | | | | | | | | | | | | | | | | | | | | JITLink is LLVM's newer jit-linker. It is an alternative to (and hopefully eventually a replacement for) LLVM's older jit-linker, RuntimeDyld. Unlike RuntimeDyld which requries JIT'd code to be complied with the large code model, JITlink can link code compiled with the small code model, which is the native code model for a number of targets (including all supported MachO targets). This example shows how to: -- Create a JITLink InProcessMemoryManager -- Set the code model to small -- Use a JITLink backed ObjectLinkingLayer as the linking layer for LLJIT (rather than the default RTDyldObjectLinkingLayer). Note: This example will only work on platforms supported by JITLink. As of this commit that's MachO/x86-64 and MachO/arm64. llvm-svn: 375266
* AMDGPU: Fix SMEM WAR hazard for gfx10 readlaneAustin Kerbow2019-10-182-0/+16
| | | | | | | | | | | | | | | | Summary: Hazard recognizer fails to see hazard with V_READLANE_B32_gfx10. Reviewers: rampitec Reviewed By: rampitec Subscribers: arsenm, kzhuravl, jvesely, wdng, nhaehnle, yaxunl, dstuttard, tpr, t-tye, hiraditya, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D69172 llvm-svn: 375265
* [lit] Reduce value of synthesized timeoutsJulian Lettner2019-10-181-2/+3
| | | | | | | | | | | Large timeout values (one year, positive infinity) trip up Python on Windows with "OverflowError: timeout value is too large". One week seems to work and is still large enough in practice. Thanks to Simon Pilgrim for helping me test this. https://reviews.llvm.org/rL375171 llvm-svn: 375264
* [lit] Remove unnecessary tracking of test_indexJulian Lettner2019-10-182-17/+11
| | | | llvm-svn: 375263
* [lit] Only send back test result from worker processJulian Lettner2019-10-183-16/+15
| | | | | | | Avoid sending back the whole run.Test object (which needs to be pickled) from the worker process when we are only interested in the test result. llvm-svn: 375262
* [Codegen] Link MIRParser into CodeGenTests to fix MachineSizeOptsTest buildingRoman Lebedev2019-10-181-0/+1
| | | | llvm-svn: 375261
* [NFC][CVP] Add @llvm.*.sat tests where we could prove both no-overflowsRoman Lebedev2019-10-181-8/+100
| | | | llvm-svn: 375260
* [Reproducer] Use ::rtrim() to remove trailing control characters.Jonas Devlieghere2019-10-181-4/+2
| | | | | | | | Pavel correctly pointed out that removing all control characters from the working directory is overkill. It should be sufficient to just strip the last ones. llvm-svn: 375259
* [Format] Add format check for throwing negative numbersBrian Gesiak2019-10-182-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | Summary: The code `throw -1;` is currently formatted by clang-format as `throw - 1;`. This diff adds a fix for this edge case and a test to check for this in the future. For context, I am looking into a related bug in the clang-formatting of coroutine keywords: `co_yield -1;` is also reformatted in this manner as `co_yield - 1;`. A later diff will add these changes and tests for the `co_yield` and `co_return` keywords. Patch by Jonathan Thomas (jonathoma)! Reviewers: modocache, sammccall, Quuxplusone Reviewed By: sammccall Subscribers: cfe-commits Tags: #clang-format, #clang Differential Revision: https://reviews.llvm.org/D69144 llvm-svn: 375258
* [DOCS]Update list of implemented constructs, NFC.Alexey Bataev2019-10-181-2/+2
| | | | llvm-svn: 375257
* gn build: Merge r375254GN Sync Bot2019-10-183-0/+3
| | | | llvm-svn: 375256
* [OPENMP50]Add support for master taskloop simd.Alexey Bataev2019-10-1848-15/+6385
| | | | | | Added trsing/semantics/codegen for combined construct master taskloop simd. llvm-svn: 375255
* [PGO][PGSO] SizeOpts changes.Hiroshi Yamauchi2019-10-1815-20/+661
| | | | | | | | | | | | | | | | | Summary: (Split of off D67120) SizeOpts/MachineSizeOpts changes for profile guided size optimization. Reviewers: davidxl Subscribers: mgorny, hiraditya, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D69070 llvm-svn: 375254
* [X86] combineX86ShufflesRecursively - pull out isTargetShuffleVariableMask. ↵Simon Pilgrim2019-10-181-1/+2
| | | | | | NFCI. llvm-svn: 375253
* [IR] Reimplement FPMathOperator::classof as a whitelist.Jay Foad2019-10-182-7/+12
| | | | | | | | | | | | | | | | | Summary: This makes it much easier to verify that the implementation matches the documentation. It uncovered a bug in the unit tests where we were accidentally setting fast math flags on a load instruction. Reviewers: spatel, wristow, arsenm, hfinkel, aemerson, efriedma, cameron.mcinally, mcberg2017, jmolloy Subscribers: wdng, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D69176 llvm-svn: 375252
* Update docs for fast-math flags.Jay Foad2019-10-181-2/+3
| | | | | | | This adds fneg, phi and select to the list of operations that may use fast-math flags. llvm-svn: 375250
* [clang-format] fix regression recognizing casts in Obj-C callsKrasimir Georgiev2019-10-182-29/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: r373922 added checks for a few tokens that, following an `)` make it unlikely that the `)` is the closing paren of a cast expression. The specific check for `tok::l_square` there introduced a regression for casts of Obj-C calls, like: ``` (cast)[func arg] ``` From the tests added in r373922, I believe the `tok::l_square` case is added to capture the case where a non-cast `)` is directly followed by an attribute specifier, like: ``` int f(int x) [[noreturn]]; ``` I've specialized the code to look for such attribute specifier instead of `tok::l_square` in general. Also, I added a regression test and moved the test cases added in r373922 to an already existing place documenting other instances of historically misidentified casts. Reviewers: MyDeveloperDay Reviewed By: MyDeveloperDay Subscribers: cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D69164 llvm-svn: 375247
* [tooling] Relax an assert when multiple GPU targets are specified.Michael Liao2019-10-181-1/+1
| | | | llvm-svn: 375245
* ProcessMinidump: Suppress reporting stop for signal '0'Joseph Tremoulet2019-10-183-3/+50
| | | | | | | | | | | | | | | | | | | | | | | Summary: The minidump exception stream can report an exception record with signal 0. If we try to create a stop reason with signal zero, processing of the stop event won't find anything, and the debugger will hang. So, simply early-out of RefreshStateAfterStop in this case. Also set the UnixSignals object in DoLoadCore as is done for ProcessElfCore. Reviewers: labath, clayborg, jfb Reviewed By: labath, clayborg Subscribers: dexonsmith, lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D68096 llvm-svn: 375244
* LLDB: Use LLVM's type for minidump ExceptionStream [NFC]Joseph Tremoulet2019-10-187-63/+34
| | | | | | | | | | | | | | | | Summary: The types defined for it in LLDB are now redundant with core types. Reviewers: labath, clayborg Reviewed By: clayborg Subscribers: lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D68658 llvm-svn: 375243
* Update MinidumpYAML to use minidump::Exception for exception streamJoseph Tremoulet2019-10-187-3/+332
| | | | | | | | | | | | | | Reviewers: labath, jhenderson, clayborg, MaskRay, grimar Reviewed By: grimar Subscribers: lldb-commits, grimar, MaskRay, hiraditya, llvm-commits Tags: #llvm, #lldb Differential Revision: https://reviews.llvm.org/D68657 llvm-svn: 375242
* [AMDGPU][MC][GFX10] Added sdwa/dpp versions of v_cndmask_b32Dmitry Preobrazhensky2019-10-186-52/+140
| | | | | | | | | | See https://bugs.llvm.org/show_bug.cgi?id=43608 Reviewers: arsenm, rampitec Differential Revision: https://reviews.llvm.org/D69096 llvm-svn: 375241
* [DFAPacketizer] Fix large compile-time regression for VLIW targetsJames Molloy2019-10-182-11/+16
| | | | | | | | | | D68992 / rL375086 refactored the packetizer and removed a bunch of logic. Unfortunately it creates an Automaton object whenever a DFAPacketizer is required. These objects have no longevity, and in particular on a debug build the population of the Automaton's transition map from the underlying table is very slow (because it is called ~10 times per MachineFunction, in the testcase I'm looking at). This patch changes Automaton to wrap its underlying constant data in std::shared_ptr, which allows trivial copy construction. The DFAPacketizer creation function now creates a static archetypical Automaton and copies that whenever a new DFAPacketizer is required. This takes a testcase down from ~20s to ~0.5s in debug mode. llvm-svn: 375240
* Add ExceptionStream to llvm::Object::minidumpJoseph Tremoulet2019-10-183-0/+88
| | | | | | | | | | | | | | | | | | Summary: This will allow updating MinidumpYAML and LLDB to use this common definition. Reviewers: labath, jhenderson, clayborg Reviewed By: labath Subscribers: llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D68656 llvm-svn: 375239
* [lld][coff] Add missing dependency to fix build.Michael Liao2019-10-181-0/+1
| | | | llvm-svn: 375238
* One more attempt to fix PS4 buildbot after r375219Eugene Leviant2019-10-181-1/+1
| | | | | | PS4 buildbot seems to be dropping variable names for some reason llvm-svn: 375237
* Attempt to fix PS4 buildbot after r375219Eugene Leviant2019-10-181-1/+1
| | | | llvm-svn: 375235
* Add REQUIRES: x86 to more tests which need the x86 llvm target builtPavel Labath2019-10-184-0/+6
| | | | llvm-svn: 375234
* Revert r375152 as it is causing failures on EXPENSIVE_CHECKS botNemanja Ivanovic2019-10-186-66/+47
| | | | llvm-svn: 375233
* [SCEV] Removing deprecated comment in ScalarEvolutionExpanderVictor Campos2019-10-181-3/+0
| | | | | | | Removing a comment in the ScalarEvolutionExpander.cpp file that was about the class SCEVSDivExpr, which has been long gone from LLVM. llvm-svn: 375232
* [AMDGPU][MC][GFX9] Corrected parsing of v_cndmask_b32_sdwaDmitry Preobrazhensky2019-10-183-10/+27
| | | | | | | | | | See https://bugs.llvm.org/show_bug.cgi?id=43607 Reviewers: arsenm, rampitec Differential Revision: https://reviews.llvm.org/D69095 llvm-svn: 375231
* [NFC][CVP] Count all the no-wraps we provedRoman Lebedev2019-10-181-20/+74
| | | | | | | | | | | | | | | | | | Summary: It looks like this is the only missing statistic in the CVP pass. Since we prove NSW and NUW separately i'd think we should count them separately too. Reviewers: nikic, spatel, reames Reviewed By: spatel Subscribers: hiraditya, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D68740 llvm-svn: 375230
* [AArch64] Adding support for PMMIR_EL1 registerVictor Campos2019-10-186-1/+45
| | | | | | | | | | | | | | | | | | Summary: The PMMIR_EL1 register is present in Armv8.4 with PMU extension. This patch adds support for it. Reviewers: t.p.northover, dnsampaio Reviewed By: dnsampaio Subscribers: kristof.beyls, hiraditya, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D68940 llvm-svn: 375228
* [clangd] Report declaration references in findExplicitReferences.Haojian Wu2019-10-187-97/+172
| | | | | | | | | | | | Reviewers: ilya-biryukov Subscribers: MaskRay, jkorous, arphaman, kadircet, usaxena95, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D68977 llvm-svn: 375226
* [ThinLTOCodeGenerator] Add support for index-based WPDEugene Leviant2019-10-182-10/+3
| | | | | | | | | This is clang part of the patch. It adds -flto-unit flag for thin LTO builds on Mac and PS4 Differential revision: https://reviews.llvm.org/D68950 llvm-svn: 375224
* [AArch64][SVE] Add SPLAT_VECTOR ISD NodeGraham Hunter2019-10-1813-17/+238
| | | | | | | | | | | | | | | | | | | | | | | | | Adds a new ISD node to replicate a scalar value across all elements of a vector. This is needed for scalable vectors, since BUILD_VECTOR cannot be used. Fixes up default type legalization for scalable vectors after the new MVT type ranges were introduced. At present I only use this node for scalable vectors. A DAGCombine has been added to transform a BUILD_VECTOR into a SPLAT_VECTOR if all elements are the same, but only if the default operation action of Expand has been overridden by the target. I've only added result promotion legalization for scalable vector i8/i16/i32/i64 types in AArch64 for now. Reviewers: t.p.northover, javed.absar, greened, cameron.mcinally, jmolloy Reviewed By: jmolloy Differential Revision: https://reviews.llvm.org/D47775 llvm-svn: 375222
* SystemInitializerCommon fix compilation on linuxPavel Labath2019-10-181-1/+2
| | | | | | | | | | | C++ defines two overloads of std::iscntrl. One in <cctype> and one in <locale>. On linux we seem to include both which makes the std::erase_if call ambiguous. Wrap std::iscntrl call in a lambda to ensure regular overload resolution. llvm-svn: 375221
* [Arm][libsanitizer] Fix arm libsanitizer failure with bleeding edge glibcSjoerd Meijer2019-10-181-1/+4
| | | | | | | | | | | | | | | | Glibc has recently introduced changed to the mode field in ipc_perm in commit 2f959dfe849e0646e27403f2e4091536496ac0f0. For Arm this means that the mode field no longer has the same size. This causes an assert failure against libsanitizer's internal copy of ipc_perm. Since this change can't be easily detected I am adding arm to the list of targets that are excluded from this check. Patch by: Tamar Christina Differential Revision: https://reviews.llvm.org/D69104 llvm-svn: 375220
* [ThinLTOCodeGenerator] Add support for index-based WPDEugene Leviant2019-10-182-21/+104
| | | | | | Differential revision: https://reviews.llvm.org/D68950 llvm-svn: 375219
* [LLD] [COFF] Try to report source locations for duplicate symbolsMartin Storsjo2019-10-189-22/+433
| | | | | | | | | | | | | | | | | | | | | | | This fixes the second part of PR42407. For files with dwarf debug info, it manually loads and iterates .debug_info to find the declared location of variables, to allow reporting them. (This matches the corresponding code in the ELF linker.) For functions, it uses the existing getFileLineDwarf which uses LLVMSymbolizer for translating addresses to file lines. In object files with codeview debug info, only the source location of duplicate functions is printed. (And even there, only for the first input file. The getFileLineCodeView function requires the object file to be fully loaded and initialized to properly resolve source locations, but duplicate symbols are reported at a stage when the second object file isn't fully loaded yet.) Differential Revision: https://reviews.llvm.org/D68975 llvm-svn: 375218
* [AArch64] Don't combine callee-save and local stack adjustment when ↵David Green2019-10-182-0/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | optimizing for size For arm64, D18619 introduced the ability to combine bumping the stack pointer upfront in case it needs to be bumped for both the callee-save area as well as the local stack area. That diff already remarks that "This change can cause an increase in instructions", but argues that even when that happens, it should be still be a performance benefit because the number of micro-ops is reduced. We have observed that this code-size increase can be significant in practice. This diff disables combining stack bumping for methods that are marked as optimize-for-size. Example of a prologue with the behavior before this diff (combining stack bumping when possible): sub sp, sp, #0x40 stp d9, d8, [sp, #0x10] stp x20, x19, [sp, #0x20] stp x29, x30, [sp, #0x30] add x29, sp, #0x30 [... compute x8 somehow ...] stp x0, x8, [sp] And after this diff, if the method is marked as optimize-for-size: stp d9, d8, [sp, #-0x30]! stp x20, x19, [sp, #0x10] stp x29, x30, [sp, #0x20] add x29, sp, #0x20 [... compute x8 somehow ...] stp x0, x8, [sp, #-0x10]! Note that without combining the stack bump there are two auto-decrements, nicely folded into the stp instructions, whereas otherwise there is a single sub sp, ... instruction, but not folded. Patch by Nikolai Tillmann! Differential Revision: https://reviews.llvm.org/D68530 llvm-svn: 375217
* [X86] Regenerate memcmp tests and add X64-AVX512 common prefixSimon Pilgrim2019-10-181-14/+81
| | | | | | Should help make the changes in D69157 clearer llvm-svn: 375215
* Fix MSVC "not all control paths return a value" warning. NFCI.Simon Pilgrim2019-10-181-0/+1
| | | | llvm-svn: 375214
* Fix MSVC "result of 32-bit shift implicitly converted to 64 bits" warnings. ↵Simon Pilgrim2019-10-182-2/+2
| | | | | | NFCI. llvm-svn: 375213
* [Codegen] Alter the default promotion for saturating adds and subsDavid Green2019-10-1829-1374/+1071
| | | | | | | | | | | | | | | | | | The default promotion for the add_sat/sub_sat nodes currently does: ANY_EXTEND iN to iM SHL by M-N [US][ADD|SUB]SAT L/ASHR by M-N If the promoted add_sat or sub_sat node is not legal, this can produce code that effectively does a lot of shifting (and requiring large constants to be materialised) just to use the overflow flag. It is simpler to just do the saturation manually, using the higher bitwidth addition and a min/max against the saturating bounds. That is what this patch attempts to do. Differential Revision: https://reviews.llvm.org/D68926 llvm-svn: 375211
* [AArch64][SVE] Implement unpack intrinsicsKerry McLaughlin2019-10-187-5/+183
| | | | | | | | | | | | | | | | | | | | | | | | | Summary: Implements the following intrinsics: - int_aarch64_sve_sunpkhi - int_aarch64_sve_sunpklo - int_aarch64_sve_uunpkhi - int_aarch64_sve_uunpklo This patch also adds AArch64ISD nodes for UNPK instead of implementing the intrinsics directly, as they are required for a future patch which implements the sign/zero extension of legal vectors. This patch includes tests for the Subdivide2Argument type added by D67549 Reviewers: sdesmalen, SjoerdMeijer, greened, rengolin, rovka Reviewed By: greened Subscribers: tschuett, kristof.beyls, rkruppe, psnobl, cfe-commits, llvm-commits Differential Revision: https://reviews.llvm.org/D67550 llvm-svn: 375210
* [InstCombine] Fix miscompile bug in canEvaluateShuffledBjorn Pettersson2019-10-182-12/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Add restrictions in canEvaluateShuffled to prevent that we for example transform %0 = insertelement <2 x i16> undef, i16 %a, i32 0 %1 = srem <2 x i16> %0, <i16 2, i16 1> %2 = shufflevector <2 x i16> %1, <2 x i16> undef, <2 x i32> <i32 undef, i32 0> into %1 = insertelement <2 x i16> undef, i16 %a, i32 1 %2 = srem <2 x i16> %1, <i16 undef, i16 2> as having an undef denominator makes the srem undefined (for all vector elements). Fixes: https://bugs.llvm.org/show_bug.cgi?id=43689 Reviewers: spatel, lebedev.ri Reviewed By: spatel, lebedev.ri Subscribers: lebedev.ri, hiraditya, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D69038 llvm-svn: 375208
* [InstCombine] Pre-commit of test case showing miscompile bug in ↵Bjorn Pettersson2019-10-181-0/+101
| | | | | | | | | | | | | | | | | | | | canEvaluateShuffled Adding the reproducer from https://bugs.llvm.org/show_bug.cgi?id=43689, showing that instcombine is doing a bad transform. It transforms %0 = insertelement <2 x i16> undef, i16 %a, i32 0 %1 = srem <2 x i16> %0, <i16 2, i16 1> %2 = shufflevector <2 x i16> %1, <2 x i16> undef, <2 x i32> <i32 undef, i32 0> into %1 = insertelement <2 x i16> undef, i16 %a, i32 1 %2 = srem <2 x i16> %1, <i16 undef, i16 2> The undef denominator makes the whole srem undefined. llvm-svn: 375207
OpenPOWER on IntegriCloud