summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* [clangd] Remove an extra ";", NFCHaojian Wu2019-07-111-1/+1
| | | | llvm-svn: 365778
* Added mapping for pointers captured in Lambdas in OpenMP target regions,Alexey Bataev2019-07-112-9/+144
| | | | | | | | | | | | | | | | | | | by David Truby. Summary: This adds a zero length array section mapping for each pointer captured by a lambda that is used in a target region, as per section 2.19.7.1 of the OpenMP 5 specification. Reviewers: ABataev Reviewed By: ABataev Subscribers: guansong, jdoerfert, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D64558 llvm-svn: 365777
* [clangd][QueryDriver] Use language from underlying database if possibleKadir Cetinkaya2019-07-111-11/+22
| | | | | | | | | | | | Reviewers: sammccall Subscribers: ilya-biryukov, MaskRay, jkorous, arphaman, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D64489 llvm-svn: 365776
* [Object/ELF] - Improve error reporting for notes.George Rimar2019-07-112-89/+126
| | | | | | | | | | This patch improves the error messages reported for note sections and phdrs and also makes a cleanup for existent test case. Differential revision: https://reviews.llvm.org/D64470 llvm-svn: 365775
* [InstCombine] don't move FP negation out of a constant expressionSanjay Patel2019-07-112-2/+17
| | | | | | | -(X * ConstExpr) becomes X * (-ConstExpr), so don't reverse that and infinite loop. llvm-svn: 365774
* [clangd] Add priorities to background index queue, extract to separate classSam McCall2019-07-116-139/+234
| | | | | | | | | | | | Reviewers: kadircet Subscribers: mgorny, ilya-biryukov, MaskRay, jkorous, arphaman, jfb, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D64560 llvm-svn: 365773
* [yaml2obj/elf-override-shsize.yaml] - An attemp to fix ppc64 bot.George Rimar2019-07-111-2/+2
| | | | | | | | | | Failture: http://lab.llvm.org:8011/builders/clang-ppc64be-linux/builds/35670/steps/ninja%20check%201/logs/FAIL%3A%20LLVM%3A%3Aelf-override-shsize.yaml Solution: Change `od` tool invocation to print single bytes. llvm-svn: 365772
* [WebAssembly] Import __stack_pointer when building -pie binariesSam Clegg2019-07-113-18/+20
| | | | | | | | | | | | | The -pie binary doesn't know that layout ahead of time so needs to import the stack pointer from the embedder, just like we do already for shared libraries. This change is needed in order to address: https://github.com/emscripten-core/emscripten/issues/8915 Differential Revision: https://reviews.llvm.org/D64516 llvm-svn: 365771
* OpaquePtr: switch to GlobalValue::getValueType in a few places. NFC.Tim Northover2019-07-113-8/+5
| | | | llvm-svn: 365770
* OpaquePtr: use byval accessor instead of inspecting pointer type. NFC.Tim Northover2019-07-111-3/+2
| | | | | | | The accessor can deal with both "byval(ty)" and "ty* byval" forms seamlessly. llvm-svn: 365769
* OpaquePtr: use load instruction directly for type. NFC.Tim Northover2019-07-111-2/+1
| | | | llvm-svn: 365768
* InstructionSimplify: Simplify InstructionSimplify. NFC.Tim Northover2019-07-112-51/+24
| | | | | | | | | | | The interface predates CallBase, so both it and implementation were significantly more complicated than they needed to be. There was even some redundancy that could be eliminated. Should also help with OpaquePointers by not trying to derive a function's type from it's PointerType. llvm-svn: 365767
* [yaml2obj] - Allow overriding the sh_size field.George Rimar2019-07-114-10/+183
| | | | | | | | | | There is no way to set broken sh_size field currently for sections. It can be usefull for writing the test cases. Differential revision: https://reviews.llvm.org/D64401 llvm-svn: 365766
* [NFC] Updated tests for D64285David Bolvansky2019-07-112-32/+487
| | | | llvm-svn: 365765
* [clangd] Remove the extra ";", NFCHaojian Wu2019-07-111-1/+1
| | | | llvm-svn: 365764
* [clangd] Fix an assertion crash in "ExtractVariable" tweakHaojian Wu2019-07-113-8/+13
| | | | | | | | | | | | | | | | Summary: GetTypePtr requires that the type should not be null, otherwise we hit an assertion, we should use getTypePtrOrNull instead. Reviewers: sammccall, SureYeaah Subscribers: ilya-biryukov, MaskRay, jkorous, arphaman, kadircet, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D64556 llvm-svn: 365763
* [llvm-readobj/llvm-readelf] - Report a warning instead of a error when ↵George Rimar2019-07-114-20/+48
| | | | | | | | | | | | dumping a broken dynamic section. It does not make sence to stop dumping the object if the broken dynamic section was found. In this patch I changed the behavior from "report an error" to "report a warning". This matches GNU. Differential revision: https://reviews.llvm.org/D64472 llvm-svn: 365762
* [LLDB] Fix FreeBSD build.David Carlier2019-07-112-19/+24
| | | | | | | | | | | | To align with the LaunchThread change. Reviewers: MaskRay, mgorny Reviewed By: MaskRay Differential Revision: https://reviews.llvm.org/D64398 llvm-svn: 365761
* [ELF] Handle non-glob patterns before glob patterns in version scripts & fix ↵Fangrui Song2019-07-114-24/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | a corner case of --dynamic-list This fixes PR38549, which is silently accepted by ld.bfd. This seems correct because it makes sense to let non-glob patterns take precedence over glob patterns. lld issues an error because `assignWildcardVersion(ver, VER_NDX_LOCAL);` is processed before `assignExactVersion(ver, v.id, v.name);`. Move all assignWildcardVersion() calls after assignExactVersion() calls to fix this. Also, move handleDynamicList() to the bottom. computeBinding() called by includeInDynsym() has this cryptic rule: if (versionId == VER_NDX_LOCAL && isDefined() && !isPreemptible) return STB_LOCAL; Before the change: * foo's version is set to VER_NDX_LOCAL due to `local: *` * handleDynamicList() is called - foo.computeBinding() is STB_LOCAL - foo.includeInDynsym() is false - foo.isPreemptible is not set (wrong) * foo's version is set to V1 After the change: * foo's version is set to VER_NDX_LOCAL due to `local: *` * foo's version is set to V1 * handleDynamicList() is called - foo.computeBinding() is STB_GLOBAL - foo.includeInDynsym() is true - foo.isPreemptible is set (correct) Reviewed By: ruiu Differential Revision: https://reviews.llvm.org/D64550 llvm-svn: 365760
* [ELF] Warn rather than error when duplicate version assignments occurFangrui Song2019-07-113-10/+46
| | | | | | | | | | | | | | | | | | | | | | In lvm2, libdevmapper.so is linked with a version script with duplicate version assignments: DM_1_02_138 { global: ... dm_bitset_parse_list; ... }; DM_1_02_129 { global: ... dm_bitset_parse_list; ... }; ld.bfd silently accepts this while gold issues a warning. We currently error, thus inhibit producing the executable. Change the error to warning to allow this case, and improve the message. There are some cases where ld.bfd error `anonymous version tag cannot be combined with other version tags` but we just warn. It is probably OK for now. Reviewed By: grimar, ruiu Differential Revision: https://reviews.llvm.org/D64549 llvm-svn: 365759
* [InstCombine] Reorder recently added/improved pow transformationsDavid Bolvansky2019-07-112-8/+11
| | | | | | Changed cases are now faster with exp2. llvm-svn: 365758
* Revert [BitcodeReader] Validate OpNum, before accessing Record array.Florian Hahn2019-07-113-9/+0
| | | | | | | | | | | | This reverts r365750 (git commit 8b222ecf2769ee133691f208f6166ce118c4a164) llvm-dis runs out of memory while opening invalid-fcmp-opnum.bc on llvm-hexagon-elf, probably because the bitcode file contains other suspicious values. http://lab.llvm.org:8011/builders/llvm-hexagon-elf/builds/21949 llvm-svn: 365757
* [clangd] Fix windows buildbotsKadir Cetinkaya2019-07-111-5/+17
| | | | llvm-svn: 365756
* [X86] Regenerate intrinsics tests. NFCI.Simon Pilgrim2019-07-113-372/+368
| | | | llvm-svn: 365755
* [AMDGPU] Regenerate idot tests. NFCI.Simon Pilgrim2019-07-113-56/+56
| | | | | | Reduces diff in D63281. llvm-svn: 365754
* [llvm-objcopy] Don't change permissions of non-regular output filesFangrui Song2019-07-116-17/+44
| | | | | | | | | | | | | | | | | | | | | | There is currently an EPERM error when a regular user executes `llvm-objcopy a.o /dev/null`. Worse, root can even change the mode bits of /dev/null. Fix it by checking if the output file is special. A new overload of llvm::sys::fs::setPermissions with FD as the parameter is added. Users should provide `perm & ~umask` as the parameter if they intend to respect umask. The existing overload of llvm::sys::fs::setPermissions may be deleted if we can find an implementation of fchmod() on Windows. fchmod() is usually better than chmod() because it saves syscalls and can avoid race condition. Reviewed By: jakehehrlich, jhenderson Differential Revision: https://reviews.llvm.org/D64236 llvm-svn: 365753
* [X86] -fno-plt: use GOT __tls_get_addr only if GOTPCRELX is enabledFangrui Song2019-07-112-3/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: As of binutils 2.32, ld has a bogus TLS relaxation error when the GD/LD code sequence using R_X86_64_GOTPCREL (instead of R_X86_64_GOTPCRELX) is attempted to be relaxed to IE/LE (binutils PR24784). gold and lld are good. In gcc/config/i386/i386.md, there is a configure-time check of as/ld support and the GOT relaxation will not be used if as/ld doesn't support it: if (flag_plt || !HAVE_AS_IX86_TLS_GET_ADDR_GOT) return "call\t%P2"; return "call\t{*%p2@GOT(%1)|[DWORD PTR %p2@GOT[%1]]}"; In clang, -DENABLE_X86_RELAX_RELOCATIONS=OFF is the default. The ld.bfd bogus error can be reproduced with: thread_local int a; int main() { return a; } clang -fno-plt -fpic a.cc -fuse-ld=bfd GOTPCRELX gained relative good support in 2016, which is considered relatively new. It is even difficult to conditionally default to -DENABLE_X86_RELAX_RELOCATIONS=ON due to cross compilation reasons. So work around the ld.bfd bug by only using GOT when GOTPCRELX is enabled. Reviewers: dalias, hjl.tools, nikic, rnk Reviewed By: nikic Subscribers: llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D64304 llvm-svn: 365752
* [clangd] Add a missing "return nullptr;" to the SelectionTree::commonAncestor.Haojian Wu2019-07-111-0/+1
| | | | | | This would fix some mysterious crashes on codeAction in clangd. llvm-svn: 365751
* [BitcodeReader] Validate OpNum, before accessing Record array.Florian Hahn2019-07-113-0/+9
| | | | | | | | | | | | | | | Currently invalid bitcode files can cause a crash, when OpNum exceeds the number of elements in Record, like in the attached bitcode file. The test case was generated by clusterfuzz: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=15698 Reviewers: t.p.northover, thegameg, jfb Reviewed By: jfb Differential Revision: https://reviews.llvm.org/D64507 llvm-svn: 365750
* [ARM][LowOverheadLoops] Correct offset checkingSam Parker2019-07-116-13/+454
| | | | | | | | | | | | | | | | This patch addresses a couple of problems: 1) The maximum supported offset of LE is -4094. 2) The offset of WLS also needs to be checked, this uses a maximum positive offset of 4094. The use of BasicBlockUtils has been changed because the block offsets weren't being initialised, but the isBBInRange checks both positive and negative offsets. ARMISelLowering has been tweaked because the test case presented another pattern that we weren't supporting. llvm-svn: 365749
* [clangd] Reland rL365634Kadir Cetinkaya2019-07-118-69/+332
| | | | | | | | | This was reverted in rL365678, the failure was due to YAML parsing of compile_commands.json. Converting backslashes to forward slashes to fix the issue in unittest. llvm-svn: 365748
* [ARM] Remove nonexistent unsigned forms of MVE VQDMLAH.Simon Tatham2019-07-113-40/+38
| | | | | | | | | | | | | | | | | | | | The VQDMLAH.U8, VQDMLAH.U16 and VQDMLAH.U32 instructions don't actually exist: the Armv8.1-M architecture spec only lists signed forms of that instruction. The unsigned ones were added in error: they existed in an early draft of the spec, but they were removed before the public version, and we missed that particular spec change. Also affects the variant forms VQDMLASH, VQRDMLAH and VQRDMLASH. Reviewers: miyuki Subscribers: javed.absar, kristof.beyls, hiraditya, dmgreen, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D64502 llvm-svn: 365747
* [NFC][PowerPC] Added test to track current behaviour of TailDupKai Luo2019-07-111-0/+73
| | | | llvm-svn: 365746
* [clangd] Added highlightings for namespace specifiers.Johan Vikstrom2019-07-114-11/+72
| | | | | | | | | | | | | | Summary: Added highlightings for namespace specifiers. Reviewers: hokein, sammccall, ilya-biryukov Subscribers: MaskRay, jkorous, arphaman, kadircet, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D64492 llvm-svn: 365745
* [MIPS GlobalISel] Skip copies in addUseDef and addDefUsesPetar Avramovic2019-07-113-11/+130
| | | | | | | | | | | | Skip copies between virtual registers during search for UseDefs and DefUses. Since each operand has one def search for UseDefs is straightforward. But since operand can have many uses, we have to check all uses of each copy we traverse during search for DefUses. Differential Revision: https://reviews.llvm.org/D64486 llvm-svn: 365744
* [MIPS GlobalISel] RegBankSelect for chains of ambiguous instructionsPetar Avramovic2019-07-1114-26/+4527
| | | | | | | | | | | | | | | | | | | | When one of the uses/defs of ambiguous instruction is also ambiguous visit it recursively and search its uses/defs for instruction with only one mapping available. When all instruction in a chain are ambiguous arbitrary mapping can be selected. For s64 operands in ambiguous chain fprb is selected since it results in less instructions then having to narrow scalar s64 to s32. For s32 both gprb and fprb result in same number of instructions and gprb is selected like a general purpose option. At the moment we always avoid cross register bank copies. TODO: Implement a model for costs calculations of different mappings on same instruction and cross bank copies. Allow cross bank copies when appropriate according to cost model. Differential Revision: https://reviews.llvm.org/D64485 llvm-svn: 365743
* Revert Recommit "[CommandLine] Remove OptionCategory and SubCommand caches ↵Haojian Wu2019-07-116-136/+111
| | | | | | | | | | from the Option class." This reverts r365675 (git commit 43d75f977853c3ec891a440c362b2df183a211b5) The patch causes a crash in SupportTests (CommandLineTest.AliasesWithArguments). llvm-svn: 365742
* Remove some redundant code from r290372 and improve a comment.Jay Foad2019-07-111-5/+3
| | | | llvm-svn: 365741
* [ARM][ParallelDSP] Change the search for smladsSam Parker2019-07-113-253/+470
| | | | | | | | | | | | | | | | Two functional changes have been made here: - Now search up from any add instruction to find the chains of operations that we may turn into a smlad. This allows the generation of a smlad which doesn't accumulate into a phi. - The search function has been corrected to stop it falsely searching up through an invalid path. The bulk of the changes have been making the Reduction struct a class and making it more C++y with getters and setters. Differential Revision: https://reviews.llvm.org/D61780 llvm-svn: 365740
* [ASan] Use __sanitizer_fill_shadow for FastPoisonShadow on FuchsiaPetr Hosek2019-07-111-4/+6
| | | | | | | | This is the optimized implementation for Fuchsia provided by the libc. Differential Revision: https://reviews.llvm.org/D64166 llvm-svn: 365739
* [test] Silence gcc 7.4 warning [NFC]Mikael Holmen2019-07-111-1/+1
| | | | | | | | | Without this gcc 7.4.0 complains with ../unittests/Analysis/ValueTrackingTest.cpp:937:66: error: ISO C++11 requires at least one argument for the "..." in a variadic macro [-Werror] ::testing::ValuesIn(IsBytewiseValueTests)); ^ llvm-svn: 365738
* Fix build breakage on Win32.Rui Ueyama2019-07-111-1/+1
| | | | llvm-svn: 365737
* [clang-doc] Silence compiler warning with gcc 7.4 [NFC]Mikael Holmen2019-07-111-0/+3
| | | | | | | | | | | | | | | | | | | | Without the fix gcc 7.4.0 complains with /data/repo/master/clang-tools-extra/clang-doc/HTMLGenerator.cpp: In member function 'llvm::SmallString<16> clang::doc::{anonymous}::HTMLTag::ToString() const': /data/repo/master/clang-tools-extra/clang-doc/HTMLGenerator.cpp:165:1: error: control reaches end of non-void function [-Werror=return-type] } ^ /data/repo/master/clang-tools-extra/clang-doc/HTMLGenerator.cpp: In member function 'bool clang::doc::{anonymous}::HTMLTag::HasInlineChildren() const': /data/repo/master/clang-tools-extra/clang-doc/HTMLGenerator.cpp:142:1: error: control reaches end of non-void function [-Werror=return-type] } ^ /data/repo/master/clang-tools-extra/clang-doc/HTMLGenerator.cpp: In member function 'bool clang::doc::{anonymous}::HTMLTag::IsSelfClosing() const': /data/repo/master/clang-tools-extra/clang-doc/HTMLGenerator.cpp:126:1: error: control reaches end of non-void function [-Werror=return-type] } ^ cc1plus: all warnings being treated as errors llvm-svn: 365736
* Add NetBSD LSan supportKamil Rytarowski2019-07-1111-19/+394
| | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Combine few relatively small changes into one: - implement internal_ptrace() and internal_clone() for NetBSD - add support for stoptheworld based on the ptrace(2) API - define COMPILER_RT_HAS_LSAN for NetBSD - enable tests for NetBSD/amd64 Inspired by the original implementation by Christos Zoulas in netbsd/src for GCC. The implementation is in theory CPU independent through well defined macros across all NetBSD ports, however only the x86_64 version was tested. Reviewers: mgorny, dvyukov, vitalybuka, joerg, jfb Reviewed By: vitalybuka Subscribers: dexonsmith, jfb, srhines, kubamracek, llvm-commits, christos Tags: #llvm Differential Revision: https://reviews.llvm.org/D64057 llvm-svn: 365735
* Fix build breakage on Darwin.Rui Ueyama2019-07-111-1/+1
| | | | llvm-svn: 365734
* Update comments for r365730. NFC.Rui Ueyama2019-07-112-14/+14
| | | | llvm-svn: 365733
* Fix build breakage on Win32.Rui Ueyama2019-07-111-1/+1
| | | | llvm-svn: 365732
* [WebAssembly] Print error message for llvm.clear_cache intrinsicHeejin Ahn2019-07-112-0/+17
| | | | | | | | | | | | | | | | Summary: Wasm does not currently support `llvm.clear_cache` intrinsic, and this prints a proper error message instead of segfault. Reviewers: dschuff, sbc100, sunfish Subscribers: jgravelle-google, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D64322 llvm-svn: 365731
* [Coding style change][lld] Rename variables for non-ELF portsRui Ueyama2019-07-1188-9454/+9454
| | | | | | | | | | | This patch does the same thing as r365595 to other subdirectories, which completes the naming style change for the entire lld directory. With this, the naming style conversion is complete for lld. Differential Revision: https://reviews.llvm.org/D64473 llvm-svn: 365730
* [InstCombine][NFCI] Add test coverage to onehot_merge.llHuihui Zhang2019-07-111-0/+145
| | | | | | Prep work for upcoming patch D64275. llvm-svn: 365729
OpenPOWER on IntegriCloud