summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* [libomptarget] Introduce LIBOMPTARGET_ENABLE_DEBUG cmake option.Michael Kruse2019-03-262-5/+9
| | | | | | | | | | | | | | | | | | | At the moment, support for runtime debug output using the OMPTARGET_DEBUG=1 environment variable is only available with CMAKE_BUILD_TYPE=Debug builds. The patch allows setting it independently using the LIBOMPTARGET_ENABLE_DEBUG option, which is enabled by default depending on CMAKE_BUILD_TYPE. That is, unless this option is set explicitly, nothing changes. This is the same mechanism used by LLVM for LLVM_ENABLE_ASSERTIONS. This patch also removes adding -g -O0 in debug builds, it should be handled by cmake's CMAKE_{C|CXX}_FLAGS_DEBUG configuration option. Idea by Hal Finkel Differential Revision: https://reviews.llvm.org/D55952 llvm-svn: 356998
* [SystemZ] Remove LRMux pseudo instruction.Jonas Paulsson2019-03-261-3/+0
| | | | | | | This instruction is unused and not needed. Review: Ulrich Weigand. llvm-svn: 356997
* [DAG] Avoid smart constructor-based dangling nodes.Nirav Dave2019-03-2649-3723/+3300
| | | | | | | | | | | | | | | Various SelectionDAG non-combine operations (e.g. the getNode smart constructor and legalization) may leave dangling nodes by applying optimizations or not fully pruning unused result values. This can result in nodes that are never added to the worklist and therefore can not be pruned. Add a node inserter as the current node deleter to make sure such nodes have the chance of being pruned. Many minor changes, mostly positive. llvm-svn: 356996
* python 2/3 compat: commands vs subprocessSerge Guelton2019-03-269-17/+28
| | | | | | Differential Revision: https://reviews.llvm.org/D59584 llvm-svn: 356995
* Moved body of methods dump to .cpp file to fix compilation when modulesMikhail R. Gadelha2019-03-262-3/+7
| | | | | | are enabled llvm-svn: 356994
* Remove the TypePair classPavel Labath2019-03-264-148/+46
| | | | | | | | | | | | | | | | Summary: After D59297, the TypePair class kind of lost its purpose as it was no longer a "pair". This finishes the job started in that patch and deletes the class altogether. All usages have been updated to use CompilerType class directly. Reviewers: clayborg, jingham, zturner Subscribers: mehdi_amini, dexonsmith, jdoerfert, lldb-commits Differential Revision: https://reviews.llvm.org/D59414 llvm-svn: 356993
* Minidump: Use minidump types defined in llvmPavel Labath2019-03-265-180/+82
| | | | | | | | This is the next step in moving the minidump parsing into llvm. I remove the minidump structures already defined in the llvm Object library and convert our parser to use those. NFC. llvm-svn: 356992
* [RISCV] Improve codegen for icmp {ne,eq} with a constantLuis Marques2019-03-262-0/+26
| | | | | | | | | Adds two patterns to improve the codegen of GPR value comparisons with small constants. Instead of first loading the constant into another register and then doing an XOR of those registers, these patterns directly use the constant as an XORI immediate. llvm-svn: 356990
* [TargetLowering] Add SimplifyDemandedBits support for ISD::INSERT_VECTOR_ELTSimon Pilgrim2019-03-269-31/+65
| | | | | | | | | | | | This helps us relax the extension of a lot of scalar elements before they are inserted into a vector. Its exposes an issue in DAGCombiner::convertBuildVecZextToZext as some/all the zero-extensions may be relaxed to ANY_EXTEND, so we need to handle that case to avoid a couple of AVX2 VPMOVZX test regressions. Once this is in it should be easier to fix a number of remaining failures to fold loads into VBROADCAST nodes. Differential Revision: https://reviews.llvm.org/D59484 llvm-svn: 356989
* Fix nondeterminism introduced in r353954Yi Kong2019-03-263-2/+52
| | | | | | | | | | DenseMap iteration order is not guaranteed, use MapVector instead. Fix provided by srhines. Differential Revision: https://reviews.llvm.org/D59807 llvm-svn: 356988
* [OpenCL] Allow variadic macros as Clang feature.Anastasia Stulova2019-03-264-7/+23
| | | | llvm-svn: 356987
* [TableGen] Let list elements have a trailing commaJaved Absar2019-03-262-0/+8
| | | | | | | | | | | Let lists have an trailing comma to allow cleaner diffs e.g: def : Features<[FeatureA, FeatureB, ]>; Reviewed By: hfinkel Differential Revision: https://reviews.llvm.org/D59247 llvm-svn: 356986
* [TableGen] Give meaningful msg for def use in multiclassJaved Absar2019-03-262-2/+18
| | | | | | | | | | | | | When one mistakenly specifies 'def' instead of using 'defm', the error message is quite misleading: 'Couldn't find class..' Instead, it should recommend using defm if the multiclass of same name exists. Reviewed By: hfinkel Differential Revision: https://reviews.llvm.org/D59294 llvm-svn: 356985
* [ARM][Asm] Accept upper case coprocessor number and registersOliver Stannard2019-03-263-2/+58
| | | | | | Differential revision: https://reviews.llvm.org/D59760 llvm-svn: 356984
* update the release notes after the change of 'clang -dumpversion'Sylvestre Ledru2019-03-261-0/+2
| | | | llvm-svn: 356983
* [llvm-dlltool] Set a proper machine type for weak symbol object filesMartin Storsjo2019-03-262-1/+4
| | | | | | | | | | | | | | | This makes GNU binutils not reject the libraries outright. GNU ld handles weak externals slightly differently though, so it can't use them for aliases in import libraries, but this makes GNU ld able to use the rest of the import libraries. LLD accepted object files with machine type 0 aka IMAGE_FILE_MACHINE_UNKNOWN. Differential Revision: https://reviews.llvm.org/D59742 llvm-svn: 356982
* [RISCV] Pass -target-abi to -cc1asRoger Ferrer Ibanez2019-03-264-4/+33
| | | | | | | | | | | | | | | | | The RISC-V assembler needs the target ABI because it defines a flag of the ELF file, as described in [1]. Make clang (the driver) to pass the target ABI to -cc1as in exactly the same way it does for -cc1. Currently -cc1as knows about -target-abi but is not handling it. Handle it and pass it to the MC layer via MCTargetOptions. [1] https://github.com/riscv/riscv-elf-psabi-doc/blob/master/riscv-elf.md#file-header Differential Revision: https://reviews.llvm.org/D59298 llvm-svn: 356981
* [ADT] Update SmallVectorTest.EmplaceBack tests after rL356312Fangrui Song2019-03-261-36/+42
| | | | | | | | | | | | | | | | | rL356312 changed the return type of emplace_back from void to reference. Update the tests to check the behavior. Reviewers: dblaikie Reviewed By: dblaikie Subscribers: dexonsmith, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D59809 llvm-svn: 356980
* [X86] In matchBitExtract, place all of the new nodes before Node's position ↵Craig Topper2019-03-261-10/+9
| | | | | | | | | | in the DAG for the topological sort. We were using OrigNBits, but that put all the nodes before the node we used to start the control computation. This caused some node earlier than the sequence we inserted to be selected before the sequence we created. We want our new sequence to be selected first since it depends on OrigNBits. I don't have a test case. Found by reviewing the code. llvm-svn: 356979
* [X86] In matchBitExtract, if we need to truncate the BEXTR make sure we put ↵Craig Topper2019-03-261-1/+1
| | | | | | | | the BEXTR at Node's position in the DAG for the topological sort. We were using OrigNBits, but that doesn't guarantee that it will be selected before the nodes that make up X. llvm-svn: 356978
* [X86] Remove unneeded FIXME. NFCCraig Topper2019-03-261-2/+0
| | | | | | We do fold loads right below this. llvm-svn: 356977
* Reland "[WebAssembly] Add linker options to control feature checking"Thomas Lively2019-03-268-19/+224
| | | | | | | | | Do not pipe binary data between processes in lit tests this time, since it turns out that can break on Windows. This reverts commit 84c8652fc3085155d0f9c355455e5a797c6d9db6. llvm-svn: 356975
* [clangd][xpc][cmake] Respect explicit value of CLANGD_BUILD_XPCJan Korous2019-03-261-3/+10
| | | | | | | | | | | | | We shouldn't prevent user from disabling XPC framework build on Darwin. However, by keeping it on by default our CI systems also test it by default on macOS. Based on user request: http://lists.llvm.org/pipermail/cfe-dev/2019-March/061778.html Differential Revision: https://reviews.llvm.org/D59808 llvm-svn: 356974
* X86Parser: Fix potential reference to deleted objectCraig Topper2019-03-261-9/+9
| | | | | | | | Within the MatchFPUWaitAlias function, Operands[0] is potentially overwritten leading to &Op referencing a deleted object. To fix this, assign the reference after the function. Differential Revision: https://reviews.llvm.org/D57376 llvm-svn: 356973
* X86AsmParser: Do not process a non-existent tokenCraig Topper2019-03-263-2/+11
| | | | | | | | | | This error can only happen if an unfinished operation is at Eof. Patch by Brandon Jones Differential Revision: https://reviews.llvm.org/D57379 llvm-svn: 356972
* [Python] Define empty SWIG wrapper for unit testin"Jonas Devlieghere2019-03-264-28/+193
| | | | | | | | | The python plugin uses wrappers generated by swig. For the symbols to be available, we'd need to link against liblldb, which is not an option because the symbols could conflict with the static library we are testing. Instead we define the symbols ourselves in the unit test. llvm-svn: 356971
* [CMake][Fuchsia] Merge static libunwind and libc++abi into libc++ on DarwinPetr Hosek2019-03-261-0/+12
| | | | | | | | | We want to distribute only a single archive so -lc++ does the right thing and users don't have to explicitly link -lc++abi and -lunwind. Differential Revision: https://reviews.llvm.org/D59803 llvm-svn: 356970
* [CFG] [analyzer] pr41142: C++17: Skip transparent InitListExprs in ExprEngine.Artem Dergachev2019-03-262-6/+20
| | | | | | | | | | | | | | | | | | | r356634 didn't fix all the problems caused by r356222 - even though simple constructors involving transparent init-list expressions are now evaluated precisely, many more complicated constructors aren't, for other reasons. The attached test case is an example of a constructor that will never be evaluated precisely - simply because there isn't a constructor there (instead, the program invokes run-time undefined behavior by returning without a return statement that should have constructed the return value). Fix another part of the problem for such situations: evaluate transparent init-list expressions transparently, so that to avoid creating ill-formed "transparent" nonloc::CompoundVals. Differential Revision: https://reviews.llvm.org/D59622 llvm-svn: 356969
* [ELF] Change GOT*_FROM_END (relative to end(.got)) to GOTPLT* (start(.got.plt))Fangrui Song2019-03-2524-176/+143
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This should address remaining issues discussed in PR36555. Currently R_GOT*_FROM_END are exclusively used by x86 and x86_64 to express relocations types relative to the GOT base. We have _GLOBAL_OFFSET_TABLE_ (GOT base) = start(.got.plt) but end(.got) != start(.got.plt) This can have problems when _GLOBAL_OFFSET_TABLE_ is used as a symbol, e.g. glibc dl_machine_dynamic assumes _GLOBAL_OFFSET_TABLE_ is start(.got.plt), which is not true. extern const ElfW(Addr) _GLOBAL_OFFSET_TABLE_[] attribute_hidden; return _GLOBAL_OFFSET_TABLE_[0]; // R_X86_64_GOTPC32 In this patch, we * Change all GOT*_FROM_END to GOTPLT* to fix the problem. * Add HasGotPltOffRel to denote whether .got.plt should be kept even if the section is empty. * Simplify GotSection::empty and GotPltSection::empty by setting HasGotOffRel and HasGotPltOffRel according to GlobalOffsetTable early. The change of R_386_GOTPC makes X86::writePltHeader simpler as we don't have to compute the offset start(.got.plt) - Ebx (it is constant 0). We still diverge from ld.bfd (at least in most cases) and gold in that .got.plt and .got are not adjacent, but the advantage doing that is unclear. Reviewers: ruiu, sivachandra, espindola Subscribers: emaste, mehdi_amini, arichardson, dexonsmith, jdoerfert, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D59594 llvm-svn: 356968
* [Python] Move SWIG wrapper dependency into the pluginJonas Devlieghere2019-03-253-6/+28
| | | | | | This should fix the Windows bot (fingers crossed). llvm-svn: 356967
* Use a class instead of lambda-based callbacks to organize garbage collector.Rui Ueyama2019-03-251-117/+120
| | | | | | | | | | | | | | | | | | | | | | lld's mark-sweep garbage collector was written in the visitor pattern. There are functions that traverses a given graph, and the functions calls callback functions to dispatch according to node type. The code was originaly pretty simple, and lambdas worked pretty well. However, as we add more features to the garbage collector, that became more like a callback hell. We now have a callback function that wraps another callback function, for example. It is not easy to follow the flow of the control. This patch rewrites it as a regular class. What was once a lambda is now a regular class member function. I think this change fixes the readability issue. No functionality change intended. Differential Revision: https://reviews.llvm.org/D59800 llvm-svn: 356966
* Moving ManagedMemoryRewritePass when hybrid option is selectedMichael Kruse2019-03-251-4/+7
| | | | | | | | | | | | | | | Compiling with -polly-target=hybrid was causing Polly to occur two times in the pipeline. The reason was how the ManagedMemoryRewritePass was registered in the pass manager. ManagedMemoryRewritePass being a ModulePass was forcing all previous passes to get recomputed. This commit avoids Polly to appear two times in the pipeline registering the ManagedMemoryRewritePass later in the pass manager. Patch by Lorenzo Chelini <l.chelini@icloud.com> Differential Revision: https://reviews.llvm.org/D59263 llvm-svn: 356965
* [MS] Add frontend support for __declspec(allocator)Reid Kleckner2019-03-255-0/+57
| | | | | | | | | | The intention is to add metadata to direct call sites of functions marked with __declspec(allocator), which will ultimately result in some S_HEAPALLOCSITE debug info records when emitting codeview. This is a piece of PR38491 llvm-svn: 356964
* [ARM] Add missing memory operands to a bunch of instructions.Eli Friedman2019-03-254-30/+64
| | | | | | | | | | | | | | This should hopefully lead to minor improvements in code generation, and more accurate spill/reload comments in assembly. Also fix isLoadFromStackSlotPostFE/isStoreToStackSlotPostFE so they don't lead to misleading assembly comments for merged memory operands; this is technically orthogonal, but in practice the relevant memory operand lists don't show up without this change. Differential Revision: https://reviews.llvm.org/D59713 llvm-svn: 356963
* [OpenMP] Add LLVM license header to fileJonathan Peyton2019-03-251-0/+12
| | | | | | This file was missing the LLVM license header llvm-svn: 356962
* [OpenMP] Add Intel 19.0 to list of compilers in kmp_version.cppJonathan Peyton2019-03-251-3/+3
| | | | llvm-svn: 356961
* [lldb] [Process/NetBSD] Use nullptr to fix template arg deductionMichal Gorny2019-03-251-1/+1
| | | | llvm-svn: 356960
* [x86] add tests for vector cmps; NFCSanjay Patel2019-03-252-0/+1420
| | | | llvm-svn: 356959
* Revert "AMDGPU: Scavenge register instead of findUnusedReg"Matt Arsenault2019-03-251-1/+1
| | | | | | | | This reverts r356149. This is crashing on rocBLAS. llvm-svn: 356958
* [Sema] Don't check for array bounds when the types in the base expression ↵Bruno Ricci2019-03-252-0/+15
| | | | | | | | | | | | | | are dependent Bail-out of CheckArrayAccess when the types of the base expression before and after eventual casts are dependent. We will get another chance to check for array bounds during instantiation. Fixes PR41087. Differential Revision: https://reviews.llvm.org/D59776 Reviewed By: efriedma llvm-svn: 356957
* AMDGPU: Remove unnecessary check for isFullCopyMatt Arsenault2019-03-251-1/+1
| | | | | | | Subregister indexes are not used for physical register operands, so isFullCopy is implied by the physical register check. llvm-svn: 356956
* AMDGPU: Make collapse-endcf test more usefulMatt Arsenault2019-03-251-6/+20
| | | | | | | | Without a VALU instruction in the return block, these were mostly testing the path to delete exec mask code before s_endpgm rather than the end cf handling. llvm-svn: 356955
* [AArch64] Prefer "mov" over "orr" to materialize constants.Eli Friedman2019-03-2562-266/+267
| | | | | | | | | | | | | This is generally more readable due to the way the assembler aliases work. (This causes a lot of test changes, but it's not really as scary as it looks at first glance; it's just mechanically changing a bunch of checks for orr to check for mov instead.) Differential Revision: https://reviews.llvm.org/D59720 llvm-svn: 356954
* [WebAssembly] Don't use default GetLinkerPathSam Clegg2019-03-254-9/+31
| | | | | | | | | | | | | | | | | We can't (don't want to) honor the same set of "-fuse-ld" flags with WebAssembly since the ELF linkers (ld.lld, ld.gnu, etc) don't work with wasm object files. Instead we implement our own linker finding logic, similar or other non-ELF platforms like MSVC. We've had a few issues with CLANG_DEFAULT_LINKER overriding the WebAssembly linker which doesn't make sense since there is no generic linker that can handle WebAssembly today. Differential Revision: https://reviews.llvm.org/D59743 llvm-svn: 356953
* AMDGPU: Set hasSideEffects 0 on _term instructionsMatt Arsenault2019-03-251-0/+3
| | | | | | | | These were defaulting to true, but they are just wrappers around bit operations. This avoids regressions in the exec mask optimization passes in a future commit. llvm-svn: 356952
* Revert "[llvm] Prevent duplicate files in debug line header in dwarf 5."Ali Tamur2019-03-2514-70/+26
| | | | | | | | This reverts commit 312ab05887d0e2caa29aaf843cefe39379a98d36. My commit broke the build; I will revert and find out what happened. llvm-svn: 356951
* [PythonTestSuite] Fix usage of InitializePrivate in PythonTestSuiteJonas Devlieghere2019-03-251-3/+8
| | | | llvm-svn: 356950
* Revert "[lld] Prevent duplicate files in debug line header in dwarf 5."Ali Tamur2019-03-252-7/+9
| | | | | | | | This reverts commit 5aa7478a55fa86dae45913b82bd05ed32d9c0973. Some things are broken; I will fix and try to commit again. llvm-svn: 356949
* [LLVM-C] Add binding to look up intrinsic by nameRobert Widmann2019-03-252-0/+11
| | | | | | | | | | | | | | | | Summary: Add a binding to Function::lookupIntrinsicID so clients don't have to go searching the ID table themselves. Reviewers: whitequark, deadalnix Reviewed By: whitequark Subscribers: hiraditya, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D59697 llvm-svn: 356948
* AMDGPU: Add support for cross address space synchronization scopes (clang)Konstantin Zhuravlyov2019-03-254-23/+43
| | | | | | Differential Revision: https://reviews.llvm.org/D59494 llvm-svn: 356947
OpenPOWER on IntegriCloud