summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* [Host] Return the user's shell from GetDefaultShellJonas Devlieghere2019-10-033-9/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | | | LLDB handles shell expansion by running lldb-argdumper under a shell. Currently, this is always /bin/sh on POSIX. This potentially leads to different behavior between lldb and the user's current shell. Here's an example of different expansions between shells: $ /bin/bash -c 'echo -config={Options:[{key:foo_key,value:foo_value}]}' -config={Options:[key:foo_key]} -config={Options:[value:foo_value]} $ /bin/zsh -c 'echo -config={Options:[{key:foo_key,value:foo_value}]}' zsh:1: no matches found: -config={Options:[key:foo_key]} $ /bin/sh -c 'echo -config={Options:[{key:foo_key,value:foo_value}]}' -config={Options:[key:foo_key]} -config={Options:[value:foo_value]} $ /bin/fish -c 'echo -config={Options:[{key:foo_key,value:foo_value}]}' -config=Options:[key:foo_key] -config=Options:[value:foo_value] To reduce surprises, this patch returns the user's current shell. It first looks at the SHELL environment variable. If that isn't set, it'll ask for the user's default shell. Only if that fails, we'll fallback to /bin/sh, which should always be available. Differential revision: https://reviews.llvm.org/D68316 llvm-svn: 373644
* PR43547: substitute into the type of a non-type template parameter ifRichard Smith2019-10-032-3/+13
| | | | | | | | it's instantiation-dependent, even if it's not dependent. There might be a SFINAE check in the parameter type. llvm-svn: 373643
* [compiler-rt] More optimization levels in signal_line.cpp testVitaly Buka2019-10-031-12/+13
| | | | llvm-svn: 373642
* [X86] matchShuffleWithSHUFPD - use Zeroable element mask directly. NFCI.Simon Pilgrim2019-10-031-7/+7
| | | | | | | | | | We can make use of the Zeroable mask to indicate which elements we can safely set to zero instead of creating a target shuffle mask on the fly. This only leaves one user of createTargetShuffleMask which we can hopefully get rid of in a similar manner. This is part of the work to fix PR43024 and allow us to use SimplifyDemandedElts to simplify shuffle chains - we need to get to a point where the target shuffle masks isn't adjusted by its source inputs in setTargetShuffleZeroElements but instead we cache them in a parallel Zeroable mask. llvm-svn: 373641
* [dsymutil] Don't overload LinkOptions.Jonas Devlieghere2019-10-031-35/+34
| | | | | | | | | This should fix the build bots: error: declaration of ‘llvm::dsymutil::LinkOptions DsymutilOptions::LinkOptions’ [-fpermissive] llvm-svn: 373640
* AMDGPU/GlobalISel: Handle RegBankSelect of G_INSERT_VECTOR_ELTMatt Arsenault2019-10-032-17/+460
| | | | llvm-svn: 373639
* AMDGPU/GlobalISel: Split 64-bit vector extracts during RegBankSelectMatt Arsenault2019-10-033-173/+385
| | | | | | | | Register indexing 64-bit elements is possible on the SALU, but not the VALU. Handle splitting this into two 32-bit indexes. Extend waterfall loop handling to allow moving a range of instructions. llvm-svn: 373638
* AMDGPU/GlobalISel: Allow VGPR to index SGPR registerMatt Arsenault2019-10-032-7/+8
| | | | | | | | We can still do a waterfall loop over the index if using a VGPR to index an SGPR. The result will still be a VGPR, but we can avoid the wide copy of the source register to a VGPR. llvm-svn: 373637
* AMDGPU/GlobalISel: Add some more tests for G_INSERT legalizationMatt Arsenault2019-10-031-0/+168
| | | | llvm-svn: 373636
* AMDGPU/GlobalISel: Fix mutationIsSane assert v8s8 andMatt Arsenault2019-10-032-2/+169
| | | | | | This would try to do FewerElements to v9s8 llvm-svn: 373635
* [HIP] Enable specifying different default gpu arch for HIP/CUDA.Michael Liao2019-10-032-3/+18
| | | | | | | | | | | | Reviewers: tra, yaxunl Subscribers: cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D68394 llvm-svn: 373634
* Fix build failure with GCC on identifier reusing.Michael Liao2019-10-031-1/+1
| | | | | | | - GCC is different from clang and other compilers on that. https://godbolt.org/z/CeQE1V llvm-svn: 373633
* compiler-rt: move all __GLIBC_PREREQ into own header fileVitaly Buka2019-10-035-19/+38
| | | | | | | | | | | | Reviewers: eugenis Subscribers: dberris, #sanitizers, llvm-commits Tags: #sanitizers, #llvm Differential Revision: https://reviews.llvm.org/D68177 llvm-svn: 373632
* [libc++] Add a per-target flag to include the generated config_siteLouis Dionne2019-10-033-16/+14
| | | | | | | | | | | This allows propagating the include automatically to targets that depend on one of the libc++ targets such as the benchmarks. Note that the GoogleBenchmark build itself still needs to manually specify the -include, since I don't know of any way to have an external project link against one of the libc++ targets (which would propagate the -include automatically). llvm-svn: 373631
* AMDGPU/SILoadStoreOptimizer: Optimize scanning for mergeable instructionsTom Stellard2019-10-031-82/+185
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This adds a pre-pass to this optimization that scans through the basic block and generates lists of mergeable instructions with one list per unique address. In the optimization phase instead of scanning through the basic block for mergeable instructions, we now iterate over the lists generated by the pre-pass. The decision to re-optimize a block is now made per list, so if we fail to merge any instructions with the same address, then we do not attempt to optimize them in future passes over the block. This will help to reduce the time this pass spends re-optimizing instructions. In one pathological test case, this change reduces the time spent in the SILoadStoreOptimizer from 0.2s to 0.03s. This restructuring will also make it possible to implement further solutions in this pass, because we can now add less expensive checks to the pre-pass and filter instructions out early which will avoid the need to do the expensive scanning during the optimization pass. For example, checking for adjacent offsets is an inexpensive test we can move to the pre-pass. Reviewers: arsenm, pendingchaos, rampitec, nhaehnle, vpykhtin Subscribers: kzhuravl, jvesely, wdng, yaxunl, dstuttard, tpr, t-tye, hiraditya, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D65961 llvm-svn: 373630
* [ModuloSchedule] removeBranch() *before* creating the trip count conditionJames Molloy2019-10-032-3/+2
| | | | | | | | | | | | | | The Hexagon code assumes there's no existing terminator when inserting its trip count condition check. This causes swp-stages5.ll to break. The generated code looks good to me, it is likely a permutation. I have disabled the new codegen path to keep everything green and will investigate along with the other 3-4 tests that have different codegen. Fixes expensive-checks build. llvm-svn: 373629
* [libunwind] Adjust libunwind_01.pass.cpp test for ARM EHABIJohn Brawn2019-10-031-1/+1
| | | | | | | | | | | | ARM EHABI unwinding tables only store the start address of each function, so the last function is assumed to cover the entire address space after it. The test picks an address on the stack assuming that it's in no function, but because of the above it's actually resolved to the last function. Fix this by using address 0 instead. Differential Revision: https://reviews.llvm.org/D68387 llvm-svn: 373628
* gn build: (manually) merge r373622Nico Weber2019-10-031-0/+9
| | | | llvm-svn: 373627
* DeclBase/DeclCXX/DeclTemplate - silence static analyzer getAs<> null ↵Simon Pilgrim2019-10-033-7/+7
| | | | | | | | dereference warnings. NFCI. The static analyzer is warning about potential null dereferences, but in these cases we should be able to use castAs<> directly and if not assert will fire for us. llvm-svn: 373626
* [libc++] Add missing revision number in ABI changelogLouis Dionne2019-10-031-1/+1
| | | | llvm-svn: 373625
* [OPENMP]Fix emission of the declare target variables in device mode.Alexey Bataev2019-10-032-17/+12
| | | | | | | Declare target variables must be emitted in device mode, target triples can be empty in this case. llvm-svn: 373624
* [dsymutil] Improve consistency by removing redundant namespaces (NFC)Jonas Devlieghere2019-10-031-44/+40
| | | | | | | The dsymutil implementation file has a using-directive for the llvm namespace. This patch just removes redundant namespace qualifiers. llvm-svn: 373623
* [dsymutil] Tablegenify option parsingJonas Devlieghere2019-10-034-305/+449
| | | | | | | | | | | | | | | | | | | This patch reimplements command line option parsing in dsymutil with Tablegen and libOption. The main motivation for this change is to prevent clashes with other cl::opt options defined in llvm. Although it's a bit more heavyweight, it has some nice advantages such as no global static initializers and better separation between the code and the option definitions. I also used this opportunity to improve how dsymutil deals with incompatible options. Instead of having checks spread across the code, everything is now grouped together in verifyOptions. The fact that the options are no longer global means that we need to pass them around a bit more, but I think it's worth the trade-off. Differential revision: https://reviews.llvm.org/D68361 llvm-svn: 373622
* [BPF] Handle offset reloc endpoint ending in the middle of chain properlyYonghong Song2019-10-032-118/+227
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | During studying support for bitfield, I found an issue for an example like the one in test offset-reloc-middle-chain.ll. struct t1 { int c; }; struct s1 { struct t1 b; }; struct r1 { struct s1 a; }; #define _(x) __builtin_preserve_access_index(x) void test1(void *p1, void *p2, void *p3); void test(struct r1 *arg) { struct s1 *ps = _(&arg->a); struct t1 *pt = _(&arg->a.b); int *pi = _(&arg->a.b.c); test1(ps, pt, pi); } The IR looks like: %0 = llvm.preserve.struct.access(base, ...) %1 = llvm.preserve.struct.access(%0, ...) %2 = llvm.preserve.struct.access(%1, ...) using %0, %1 and %2 In this case, we need to generate three relocatiions corresponding to chains: (%0), (%0, %1) and (%0, %1, %2). After collecting all the chains, the current implementation process each chain (in a map) with code generation sequentially. For example, after (%0) is processed, the code may look like: %0 = base + special_global_variable // llvm.preserve.struct.access(base, ...) is delisted // from the instruction stream. %1 = llvm.preserve.struct.access(%0, ...) %2 = llvm.preserve.struct.access(%1, ...) using %0, %1 and %2 When processing chain (%0, %1), the current implementation tries to visit intrinsic llvm.preserve.struct.access(base, ...) to get some of its properties and this caused segfault. This patch fixed the issue by remembering all necessary information (kind, metadata, access_index, base) during analysis phase, so in code generation phase there is no need to examine the intrinsic call instructions. This also simplifies the code. Differential Revision: https://reviews.llvm.org/D68389 llvm-svn: 373621
* [OPENMP]Improve diagnostics for not found declare target entries.Alexey Bataev2019-10-032-20/+33
| | | | | | | We can point to the target region + emit parent functions names/real var names if they were not found in host module during device codegen. llvm-svn: 373620
* Revert "[Alignment][NFC] Allow constexpr Align"Guillaume Chatelet2019-10-035-61/+5
| | | | | | This reverts commit b3af236fb5fc6e50fcc1b54d868f0bff557f3fb1. llvm-svn: 373619
* [RISCV] Add obsolete aliases of fscsr, frcsr (fssr, frsr)Edward Jones2019-10-032-0/+18
| | | | | | | | These old aliases were renamed, but are still used by some projects (eg newlib). Differential Revision: https://reviews.llvm.org/D68392 llvm-svn: 373618
* [NFC] Added missing changes for rL373614David Bolvansky2019-10-031-0/+3
| | | | llvm-svn: 373616
* [Diagnostics] Bitwise negation of a boolean expr always evaluates to true; ↵David Bolvansky2019-10-032-1/+23
| | | | | | | | | warn with -Wbool-operation Requested here: http://lists.llvm.org/pipermail/cfe-dev/2019-October/063452.html llvm-svn: 373614
* Fix MSVC "result of 32-bit shift implicitly converted to 64 bits" warning. NFCI.Simon Pilgrim2019-10-031-1/+1
| | | | llvm-svn: 373613
* ExprConstant - silence static analyzer getAs<> null dereference warnings. NFCI.Simon Pilgrim2019-10-031-11/+10
| | | | | | The static analyzer is warning about potential null dereferences, but in these cases we should be able to use castAs<> directly and if not assert will fire for us. llvm-svn: 373612
* Remove duplicate P->getAs<PointerType>() call. NFCI.Simon Pilgrim2019-10-031-2/+2
| | | | llvm-svn: 373611
* [yaml2obj] - Add a Size tag support for SHT_LLVM_ADDRSIG sections.George Rimar2019-10-034-8/+109
| | | | | | | | | It allows using "Size" with or without "Content" in YAML descriptions of SHT_LLVM_ADDRSIG sections. Differential revision: https://reviews.llvm.org/D68334 llvm-svn: 373610
* Test commit.Sumanth Gundapaneni2019-10-031-0/+1
| | | | llvm-svn: 373609
* [MSP430] add tests for unwanted shift codegen; NFC (PR43542)Sanjay Patel2019-10-031-0/+61
| | | | llvm-svn: 373607
* Recommit r373598 "[yaml2obj/obj2yaml] - Add support for SHT_LLVM_ADDRSIG ↵George Rimar2019-10-037-11/+470
| | | | | | | | | | | | | | | | | sections." Fix: call `consumeError()` for a case missed. Original commit message: SHT_LLVM_ADDRSIG is described here: https://llvm.org/docs/Extensions.html#sht-llvm-addrsig-section-address-significance-table This patch teaches tools to dump them and to parse the YAML declarations of such sections. Differential revision: https://reviews.llvm.org/D68333 llvm-svn: 373606
* [UpdateTestChecks] add basic support for parsing msp430 asmSanjay Patel2019-10-031-0/+17
| | | | llvm-svn: 373605
* gn build: Merge r373601GN Sync Bot2019-10-031-0/+1
| | | | llvm-svn: 373603
* [libc++abi] Do not export some implementation-detail functionsLouis Dionne2019-10-032-8/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Those functions started being mistakenly exported from the libc++abi shared library after commit r344152 in 2018. Removing these symbols is technically an ABI break. However, they are not part of the C++ ABI, they haven't ever been re-exported from libc++, and they are not declared in any public header, so it's very unlikely that calls to these functions exist out there. Also, the functions have reserved names, so any impacted user would have to have tried really hard being broken by this removal. Note that avoiding this kind of problem is exactly why we're now controlling exported symbols explicitly with a textual list. Also note that applying the hidden visibility attribute is necessary because the list of exported symbols is only used on Apple platforms for the time being. Reviewers: phosek, mclow.lists, EricWF Subscribers: christof, jkorous, dexonsmith, libcxx-commits Tags: #libc Differential Revision: https://reviews.llvm.org/D68357 llvm-svn: 373602
* [PGO] Refactor Value Profiling into a plugin based oracle and create a well ↵Bardia Mahjour2019-10-035-120/+280
| | | | | | | | | | | | | | | | | | | | | | defined API for the plugins. Summary: This PR creates a utility class called ValueProfileCollector that tells PGOInstrumentationGen and PGOInstrumentationUse what to value-profile and where to attach the profile metadata. It then refactors logic scattered in PGOInstrumentation.cpp into two plugins that plug into the ValueProfileCollector. Authored By: Wael Yehia <wyehia@ca.ibm.com> Reviewer: davidxl, tejohnson, xur Reviewed By: davidxl, tejohnson, xur Subscribers: llvm-commits Tag: #llvm Differential Revision: https://reviews.llvm.org/D67920 Patch By Wael Yehia <wyehia@ca.ibm.com> llvm-svn: 373601
* [AArch64][SVE] Adding patterns for floating point SVE add instructions.Ehsan Amiri2019-10-033-12/+39
| | | | llvm-svn: 373600
* Revert r373598 "[yaml2obj/obj2yaml] - Add support for SHT_LLVM_ADDRSIG ↵George Rimar2019-10-037-469/+11
| | | | | | | | | sections." It broke BB: http://lab.llvm.org:8011/builders/clang-x86_64-debian-fast/builds/18655/steps/test/logs/stdio llvm-svn: 373599
* [yaml2obj/obj2yaml] - Add support for SHT_LLVM_ADDRSIG sections.George Rimar2019-10-037-11/+469
| | | | | | | | | | | SHT_LLVM_ADDRSIG is described here: https://llvm.org/docs/Extensions.html#sht-llvm-addrsig-section-address-significance-table This patch teaches tools to dump them and to parse the YAML declarations of such sections. Differential revision: https://reviews.llvm.org/D68333 llvm-svn: 373598
* [NFC][InstCombine] Some tests for sub-of-negatible patternRoman Lebedev2019-10-031-0/+292
| | | | | | | | | | | As we have previously estabilished, `sub` is an outcast, and should be considered non-canonical iff it can be converted to `add`. It can be converted to `add` if it's second operand can be negated. So far we mostly only do that for constants and negation itself, but we should be more through. llvm-svn: 373597
* [llvm-locstats] Copy the script only when needed; NFCDjordje Todorovic2019-10-031-2/+7
| | | | llvm-svn: 373596
* [Alignment][NFC] Remove StoreInst::setAlignment(unsigned)Guillaume Chatelet2019-10-0317-41/+34
| | | | | | | | | | | | | | | | | Summary: This is patch is part of a series to introduce an Alignment type. See this thread for context: http://lists.llvm.org/pipermail/llvm-dev/2019-July/133851.html See this patch for the introduction of the type: https://reviews.llvm.org/D64790 Reviewers: courbet, bollu, jdoerfert Subscribers: hiraditya, asbirlea, cfe-commits, llvm-commits Tags: #clang, #llvm Differential Revision: https://reviews.llvm.org/D68268 llvm-svn: 373595
* [llvm-readobj] - Stop using a precompiled binary in all.testGeorge Rimar2019-10-031-15/+24
| | | | | | | | | Having a precompiled binary here is excessive. I also added a few missing tags. Differential revision: https://reviews.llvm.org/D68386 llvm-svn: 373594
* [libTooling] Add various Stencil combinators for expressions.Yitzhak Mandelbaum2019-10-033-3/+143
| | | | | | | | | | | | | | | | | | | Summary: This revision adds three new Stencil combinators: * `expression`, which idiomatically constructs the source for an expression, including wrapping the expression's source in parentheses if needed. * `deref`, which constructs an idiomatic dereferencing expression. * `addressOf`, which constructs an idiomatic address-taking expression. Reviewers: gribozavr Subscribers: cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D68315 llvm-svn: 373593
* [Alignment][Clang][NFC] Add CharUnits::getAsAlignGuillaume Chatelet2019-10-0320-64/+69
| | | | | | | | | | | | | | | | | | Summary: This is a prerequisite to removing `llvm::GlobalObject::setAlignment(unsigned)`. This is patch is part of a series to introduce an Alignment type. See this thread for context: http://lists.llvm.org/pipermail/llvm-dev/2019-July/133851.html See this patch for the introduction of the type: https://reviews.llvm.org/D64790 Reviewers: courbet Subscribers: jholewinski, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D68274 llvm-svn: 373592
* [mips] Push `fixup_Mips_LO16` fixup for `jialc` and `jic` instructionsSimon Atanasyan2019-10-034-2/+35
| | | | llvm-svn: 373591
OpenPOWER on IntegriCloud