summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* Remove a comparator from header and instead use lambdas for simplicity. NFC.Rui Ueyama2019-02-143-20/+13
| | | | llvm-svn: 354052
* Recommit Optional specialization for trivially copyable typesSerge Guelton2019-02-142-0/+63
| | | | | | | | | | Unfortunately the original code gets misscompiled by GCC (at least 8.1), this is a tentative workaround using std::memcpy instead of inplace new for trivially copyable types. I'll revert if it breaks. Original revision: https://reviews.llvm.org/D57097 llvm-svn: 354051
* [lldb] [MainLoop] Remove redundant termination clause (NFCI)Michal Gorny2019-02-141-3/+0
| | | | | | | | | | | | | Remove the redundant termination clause from within the loop. Since the check is done at the end of the loop, it's entirely redundant to the 'while' condition. If termination was requested, the latter will become false and the 'while' loop will terminate, resulting in the 'return' statement below the loop being executed (which is equivalent to the one used inside 'if'). Differential Revision: https://reviews.llvm.org/D58227 llvm-svn: 354050
* Add a comment. NFC.Rui Ueyama2019-02-141-16/+22
| | | | llvm-svn: 354049
* Add explicit language specifier to test.Adrian Prantl2019-02-141-1/+1
| | | | llvm-svn: 354048
* [dotest] Fix compiler version number comparisonFrederic Riss2019-02-141-4/+5
| | | | | | | | | | | | | | | dotest's version comparision function is just a lexicographical compare of the version strings. This is obviously wrong. This patch implements the comparison using distutils.version.LooseVersion as suggested by Zachary. Reviewers: zturner, labath, serge-sans-paille Subscribers: jdoerfert, lldb-commits Differential Revision: https://reviews.llvm.org/D58219 llvm-svn: 354047
* Teach instcombine about remaining "idempotent" atomicrmw typesPhilip Reames2019-02-142-42/+69
| | | | | | | | | | Expand on Quentin's r353471 patch which converts some atomicrmws into loads. Handle remaining operation types, and fix a slight bug. Atomic loads are required to have alignment. Since this was within the InstCombine fixed point, somewhere else in InstCombine was adding alignment before the verifier saw it, but still, we should fix. Terminology wise, I'm using the "idempotent" naming that is used for the same operations in AtomicExpand and X86ISelLoweringInfo. Once this lands, I'll add similar tests for AtomicExpand, and move the pattern match function to a common location. In the review, there was seemingly consensus that "idempotent" was slightly incorrect for this context. Once we setle on a better name, I'll update all uses at once. Differential Revision: https://reviews.llvm.org/D58242 llvm-svn: 354046
* Support: use internal `call_once` on PPC64leSaleem Abdulrasool2019-02-141-0/+3
| | | | | | | | | Always use the internal `call_once` for PPC64le. This is needed to support the Swift toolchain on PPC64le. Patch by Sarvesh Tamba! llvm-svn: 354045
* [llvm-ar] Implement the P modifier.Jordan Rupprecht2019-02-143-19/+149
| | | | | | | | | | | | | | | | | | | Summary: GNU ar has a `P` modifier that changes filename comparisons to use full paths instead of the basename. As noted in the GNU docs, regular archives are not created with full path names, so P is used to deal with archives created by other archive programs (e.g. see the updated `absolute-paths.test` test case). Since thin archives use full path names -- paths are relative to the archive -- it seems very error prone to not imply P when dealing with thin archives, so P is implied in those cases. (I think this is a deviation from GNU ar that makes sense). This fixes PR37436 via https://github.com/ClangBuiltLinux/linux/issues/33. Reviewers: mstorsjo, pcc, ruiu, davide, david2050, rnk Subscribers: tpimh, llvm-commits, nickdesaulniers Tags: #llvm Differential Revision: https://reviews.llvm.org/D57927 llvm-svn: 354044
* [X86] cleanup inline asm register generation. NFCI.Nirav Dave2019-02-141-8/+8
| | | | llvm-svn: 354042
* [ExpressionParser] Reuse the FileManager from the compiler instance.Jonas Devlieghere2019-02-142-13/+5
| | | | | | | | | | | | I was looking at the ClangExpressionParser and noticed that we have a FileManager owned by the expression parser and later ask the compiler instance to create a new FileManager, owned by the clang CI. Looking at the code I don't see a good reason for having two instances. This patch removes the one owned by LLDB. Differential revision: https://reviews.llvm.org/D58222 llvm-svn: 354041
* Improve error message for unknown relocations.Rui Ueyama2019-02-149-16/+23
| | | | | | | | | | | | Previously, we showed the following message for an unknown relocation: foo.o: unrecognized reloc 256 This patch improves it so that the error message includes a symbol name: foo.o: unknown relocation (256) against symbol bar llvm-svn: 354040
* [SystemZ] Do not emit VEXTEND or VROUND nodes without vector support.Jonas Paulsson2019-02-142-0/+58
| | | | | | | Review: Ulrich Weigand https://reviews.llvm.org/D58240 llvm-svn: 354039
* Don't source local .lldbinit in the test suiteRaphael Isemann2019-02-141-1/+1
| | | | | | | | | | | | | | | | | | | | Summary: As suggested by Pavel, we shouldn't let our tests parse the local .lldbinit to prevent random test failures due to changed settings. Fixes Minidump/Windows/Sigsegv/sigsegv.test (and probably others too). Reviewers: labath, serge-sans-paille Reviewed By: labath Subscribers: abidh, lldb-commits, zturner Tags: #lldb Differential Revision: https://reviews.llvm.org/D58235 llvm-svn: 354038
* [CMake] Fix RPATH handling for LLDB.frameworkStefan Granitz2019-02-142-10/+13
| | | | | | | | | | | | | | | | | Summary: Generator expressions are not supported in the `BUILD_RPATH` target property. `BUILD_RPATH` is only supported in 3.8+ https://cliutils.gitlab.io/modern-cmake/chapters/intro/newcmake.html `LLDB_FRAMEWORK_INSTALL_DIR` should not overwrite, but rather add an install RPATH (and it should be the first) Reviewers: xiaobai, lanza Reviewed By: xiaobai Subscribers: mgorny Differential Revision: https://reviews.llvm.org/D57989 llvm-svn: 354037
* [Tests] Add tests for all idemptotent atomicrmwsPhilip Reames2019-02-141-6/+62
| | | | | | Base for a followup patch to strengthen the InstCombine transform, and then integrate the ExpandAtomics logic. llvm-svn: 354036
* [Sema] Fix a regression introduced in "[AST][Sema] Remove CallExpr::setNumArgs"Bruno Ricci2019-02-143-4/+42
| | | | | | | | | | | | | | | | | | | | | | | | D54902 removed CallExpr::setNumArgs in preparation of tail-allocating the arguments of CallExpr. It did this by allocating storage for max(number of arguments, number of parameters in the prototype). The temporarily nulled arguments however causes issues in BuildResolvedCallExpr when typo correction is done just after the creation of the call expression. This was unfortunately missed by the tests /: To fix this, delay setting the number of arguments to max(number of arguments, number of parameters in the prototype) until we are ready for it. It would be nice to have this encapsulated in CallExpr but this is the best I can come up with under the constraint that we cannot add anything the CallExpr. Fixes PR40286. Differential Revision: https://reviews.llvm.org/D57948 Reviewed By: aaron.ballman llvm-svn: 354035
* [X86][AVX] Add PR40730 test caseSimon Pilgrim2019-02-141-0/+36
| | | | llvm-svn: 354034
* Move UnwindTable from ObjectFile to ModulePavel Labath2019-02-148-52/+50
| | | | | | | | | | | | | | | Summary: This is a preparatory step to enable adding extra unwind strategies by symbol file plugins. This has been discussed on the lldb-dev mailing list: <http://lists.llvm.org/pipermail/lldb-dev/2019-February/014703.html>. Reviewers: jasonmolenda, clayborg, espindola Subscribers: lemo, emaste, lldb-commits, arichardson Differential Revision: https://reviews.llvm.org/D58129 llvm-svn: 354033
* Refine ArgPromotion metadata handlingTeresa Johnson2019-02-142-0/+33
| | | | | | | | | | | | | | | | | | | | Summary: In r353537 we now copy all metadata to the new function, with the old being removed when the old function is eliminated. In some cases the old function is dropped to a declaration (seems to only occur with the old PM). Go ahead and clear all metadata from the old function to handle that case, since verification will complain otherwise. This is consistent with what was being done for debug metadata before r353537. Reviewers: davidxl, uabelho Subscribers: jdoerfert, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D58215 llvm-svn: 354032
* [LoopUnrollPeel] Add case where we should forget the peeled loop from SCEV.Florian Hahn2019-02-142-10/+50
| | | | | | | | | | | | | | | | | | | | The test case requires the peeled loop to be forgotten after peeling, even though it does not have a parent. When called via the unroller, SE->forgetTopmostLoop is also called, so the test case would also pass without any SCEV invalidation, but peelLoop is exposed as utility function. Also, in the test case, simplifyLoop will make changes, removing the loop from SCEV, but it is better to not rely on this behavior. Reviewers: sanjoy, mkazantsev Reviewed By: mkazantsev Tags: #llvm Differential Revision: https://reviews.llvm.org/D58192 llvm-svn: 354031
* [lldb] [lldb-server] Catch and report errors from main loopMichal Gorny2019-02-141-1/+6
| | | | | | | | | | Catch the possible error from lldb-gdbserver's main loop, and report it verbosely. Currently, if the loop fails the server exits normally, rendering the problem indistinguishable from regular termination. Differential Revision: https://reviews.llvm.org/D58228 llvm-svn: 354030
* [lldb] [MainLoop] Report errno for failed kevent()Michal Gorny2019-02-141-1/+1
| | | | | | | | | | Modify the kevent() error reporting to use errno rather than returning the return value. At least on FreeBSD and NetBSD, kevent() always returns -1 in case of error, and the actual error is returned via errno. Differential Revision: https://reviews.llvm.org/D58229 llvm-svn: 354029
* [RISCV][NFC] Add RV64I CHECK lines to inline-asm.ll testAlex Bradbury2019-02-141-0/+31
| | | | llvm-svn: 354028
* [ASTImporter] Check visibility/linkage of functions and variablesGabor Marton2019-02-143-72/+370
| | | | | | | | | | | | | | | | | | | | | | | | | | Summary: During import of a global variable with external visibility the lookup will find variables (with the same name) but with static visibility. Clearly, we cannot put them into the same redecl chain. The same is true in case of functions. In this fix we filter the lookup results and consider only those which have the same visibility as the decl we currently import. We consider two decls in two anonymous namsepaces to have the same visibility only if they are imported from the very same translation unit. Reviewers: a_sidorin, shafik, a.sidorin Reviewed By: shafik Subscribers: jdoerfert, balazske, rnkovacs, dkrupp, Szelethus, gamesh411, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D57232 llvm-svn: 354027
* Reapply [VFS] Allow multiple RealFileSystem instances with independent CWDs.Sam McCall2019-02-143-31/+167
| | | | | | | | | | This reverts commit r351091. The original mac breakages are addressed by ensuring the root directory we're working from is fully symlink-resolved before starting. Differential Revision: https://reviews.llvm.org/D58169 llvm-svn: 354026
* [MIPS GlobalISel] Select phi instruction for integers Petar Avramovic2019-02-146-0/+602
| | | | | | | | Select G_PHI for integers for MIPS32. Differential Revision: https://reviews.llvm.org/D58183 llvm-svn: 354025
* [Instrumentation][NFC] Fix warning.Clement Courbet2019-02-141-1/+1
| | | | | | lib/Transforms/Instrumentation/AddressSanitizer.cpp:1173:29: warning: extra ‘;’ [-Wpedantic] llvm-svn: 354024
* [Builtins] Treat `bcmp` as a builtin.Clement Courbet2019-02-148-18/+86
| | | | | | | | | | | | | | | | | Summary: This makes it consistent with `memcmp` and `__builtin_bcmp`. Also see the discussion in https://reviews.llvm.org/D56593. Reviewers: jyknight Subscribers: kristina, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D58120 llvm-svn: 354023
* [MIPS GlobalISel] Select branch instructionsPetar Avramovic2019-02-148-1/+379
| | | | | | | | | | | | | Select G_BR and G_BRCOND for MIPS32. Unconditional branch G_BR does not have register operand, for that reason we only add tests. Since conditional branch G_BRCOND compares register to zero on MIPS32, explicit extension must be performed on i1 condition in order to set high bits to appropriate value. Differential Revision: https://reviews.llvm.org/D58182 llvm-svn: 354022
* Make widenable condition transparent for MemoryWriteTrackingMax Kazantsev2019-02-141-0/+4
| | | | | | | | | Side effects of widenable condition intrinsic are modelled via InaccessibleMemOnly, and there is no way to say that it isn't really writing any memory. This patch teaches MemoryWriteTracking ignore this intrinsic. llvm-svn: 354021
* Teach isGuaranteedToTransferExecutionToSuccessor about widenable conditionsMax Kazantsev2019-02-141-1/+2
| | | | | | | Widenable condition intrinsic is guaranteed to return value, notify the isGuaranteedToTransferExecutionToSuccessor function about it. llvm-svn: 354020
* Fix an accidentally flipped pair of arguments, NFCIJeremy Morse2019-02-141-1/+1
| | | | | | | | | While rebasing a refactor in r353950 I accidentally swapped two function arguments; one is SelectionDAGBuilders "current" DebugLoc, the other is the one from the "current" debug intrinsic. They're probably always identical, but I haven't proved that yet. llvm-svn: 354019
* [ARM] Ensure we update the correct flags in the peephole optimiserDavid Green2019-02-142-2/+40
| | | | | | | | | | | | | | | | The Arm peephole optimiser code keeps track of both an MI and a SubAdd that can be used to optimise away a CMP. In the rare case that both are found and not ruled-out as valid, we could end up setting the flags on the wrong one. Instead make sure we are using SubAdd if it exists, as it will be closer to the CMP. The testcase here is a little theoretical, with a dead def of cpsr. It should hopefully show the point. Differential Revision: https://reviews.llvm.org/D58176 llvm-svn: 354018
* [Support] Fix TempFile::discard to not leave behind temporary filesAndrew Ng2019-02-141-13/+14
| | | | | | | | | | | | | | Moved the remove of the temporary file to after the close to avoid remove failures caused by ETXTBSY errors. This issue was seen when FileOutputBuffer falls back to an in memory buffer due to the inability to mmap the on disk file. This occurred when running LLD on an Ubuntu VM in VirtualBox on a Windows host attempting to write the output to a VirtualBox shared folder. Differential Revision: https://reviews.llvm.org/D57960 llvm-svn: 354017
* Revert "Temporarily disable calls to getgrnam/getgrnam_r in test due to it ↵Douglas Yung2019-02-141-4/+2
| | | | | | | | | | hitting unrelated issues in EGLIBC 2.19." This reverts commit r353594. We have updated our internal build bot to a newer version of LIBC which does not have this problem. llvm-svn: 354014
* [NFC] Refactor LICM code for better readabilityMax Kazantsev2019-02-141-6/+11
| | | | llvm-svn: 354013
* [gdb-remote] Sanity check platform pointerAaron Smith2019-02-141-2/+5
| | | | llvm-svn: 354012
* [llvm-readobj][test] Add all GNU_PROPERTY_X86_FEATURE_2_{NEEDED,USED} bitsFangrui Song2019-02-141-13/+13
| | | | | | And delete trailing whitespace llvm-svn: 354011
* [lldb-server] Add remote platform capabilities for WindowsAaron Smith2019-02-146-275/+217
| | | | | | | | | | | | | | | | | | Summary: Implement a few routines for Windows to support some basic process interaction and file system operations. Reviewers: zturner, llvm-commits, labath, jingham Reviewed By: labath Subscribers: emaste, jdoerfert, Hui, labath, lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D56232 llvm-svn: 354010
* Print a note to the called macro when diagnosing err_embedded_directiveNico Weber2019-02-146-2/+12
| | | | | | | | Fixes PR40713, see there for the motivation for this. Differential Revision: https://reviews.llvm.org/D58161 llvm-svn: 354009
* [NewPM] Add explicit triple to testFrancis Visoiu Mistrih2019-02-141-0/+2
| | | | | | | | | | This prevents warnings like: > warning: overriding the module target triple with x86_64-apple-darwin on macOS. llvm-svn: 354008
* Relax test to check for a valid number instead of a specific numberDouglas Yung2019-02-141-1/+1
| | | | | | to be like every other check in this test. llvm-svn: 354007
* lld/coff: Simplify error message for comdat selection mismatchesNico Weber2019-02-143-107/+135
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Turns out nobody understands what "conflicting comdat type" is supposed to mean, so just emit a regular "duplicate symbol" error and move the comdat selection information into /verbose output. This also fixes a problem where the error output would depend on the order of .obj files passed. Before this patch: - If passed `one_only.obj discard.obj`, lld-link would only err "conflicting comdat type" - If passed `discard.obj one_only.obj`, lld-link would err "conflicting comdat type" and then "duplicate symbol" Now lld-link only errs "duplicate symbol" in both cases. I considered adding a "Detail" parameter to reportDuplicate() that's printed in parens at the end of the "duplicate symbol" diag if present, and then put the comdat selection mismatch details there, but since users don't know what it's supposed to mean decided against it. I also considered special-casing the Detail message for one_only/discard mismatches, which in practice means "function defined as inline in TU 1 but as out-of-line in TU 2", but I wasn't sure how useful it is so I omitted that too. Differential Revision: https://reviews.llvm.org/D58180 llvm-svn: 354006
* [msan] Don't delete MSanAtExitRecordVitaly Buka2019-02-142-1/+40
| | | | | | | | | | | | | | | | | | Summary: Pre 2.27 libc can run same atexit handler twice We will keep MSanAtExitRecord and reset fun to mark it as executed. Fix PR40162 Reviewers: eugenis Subscribers: jfb, jdoerfert, #sanitizers, llvm-commits Tags: #sanitizers, #llvm Differential Revision: https://reviews.llvm.org/D58221 llvm-svn: 354005
* [CUDA][HIP] Use device side kernel and variable names when registering themYaxun Liu2019-02-146-50/+114
| | | | | | | | | | | | | | | | | | __hipRegisterFunction and __hipRegisterVar need to accept device side kernel and variable names so that HIP runtime can associate kernel stub functions in host code with kernel symbols in fat binaries, and associate shadow variables in host code with device variables in fat binaries. Currently, clang assumes kernel functions and device variables have the same name as the kernel stub functions and shadow variables. However, when host is compiled in windows with MSVC C++ ABI and device is compiled with Itanium C++ ABI (e.g. AMDGPU), kernels and device symbols in fat binary are mangled differently than host. This patch gets the device side kernel and variable name by mangling them in the mangle context of aux target. Differential Revision: https://reviews.llvm.org/D58163 llvm-svn: 354004
* [X86] Make (f80 (sint_to_fp (i16))) use fistps/fisttps instead of ↵Craig Topper2019-02-142-27/+23
| | | | | | | | | | fistpl/fisttpl when SSE is enabled. When SSE is enabled sint_to_fp with i16 is blindly promoted to i32, but that changes the behavior of f80 conversion. Move the promotion to i16 to LowerFP_TO_INT so we can limit it based on the floating point type. llvm-svn: 354003
* Revert "[llvm-objdump] Allow short options without arguments to be grouped"Matthew Voss2019-02-144-30/+20
| | | | | | | | Reverted due to failures on the llvm-hexagon-elf. This reverts commit 77e1f27476c89f65eeb496d131065177e6417f23. llvm-svn: 354002
* Relax restriction in tests to where "-emit-llvm-bc" and "-emit-obj" must appear.Douglas Yung2019-02-143-28/+40
| | | | | | | The CHECK lines as structured were requiring them to appear only in a certain position while all that is really needed is to check that they are present. llvm-svn: 354001
* [libFuzzer] trying to fix the bot (can't reproduce the build failure locally)Kostya Serebryany2019-02-141-1/+2
| | | | llvm-svn: 354000
OpenPOWER on IntegriCloud