summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* [codeview] Try to avoid emitting .cv_loc with line zeroReid Kleckner2019-10-103-4/+91
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Visual Studio doesn't like it while stepping. It kicks you out of the source view of the file being stepped through and tries to fall back to the disassembly view. Fixes PR43530 The fix is incomplete, because it's possible to have a basic block with no source locations at all. In this case, we don't emit a .cv_loc, but that will result in wrong stepping behavior in the debugger if the layout predecessor of the location-less BB has an unrelated source location. We could try harder to find a valid location that dominates or post-dominates the current BB, but in general it's a dataflow problem, and one still might not exist. I left a FIXME about this. As an alternative, we might want to consider having the middle-end check if its emitting codeview and get it to stop using line zero. Reviewers: akhuang Subscribers: hiraditya, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D68747 llvm-svn: 374267
* Use -fdebug-compilation-dir to form absolute paths in coverage mappingsReid Kleckner2019-10-103-9/+40
| | | | | | | | | | | | | This allows users to explicitly request relative paths with `-fdebug-compilation-dir .`. Fixes PR43614 Reviewers: vsk, arphaman Differential Revision: https://reviews.llvm.org/D68733 llvm-svn: 374266
* [ASan] Do not misrepresent high value address dereferences as null dereferencesJulian Lettner2019-10-107-6/+90
| | | | | | | | | | | | | | | | | | | | | | Dereferences with addresses above the 48-bit hardware addressable range produce "invalid instruction" (instead of "invalid access") hardware exceptions (there is no hardware address decoding logic for those bits), and the address provided by this exception is the address of the instruction (not the faulting address). The kernel maps the "invalid instruction" to SEGV, but fails to provide the real fault address. Because of this ASan lies and says that those cases are null dereferences. This downgrades the severity of a found bug in terms of security. In the ASan signal handler, we can not provide the real faulting address, but at least we can try not to lie. rdar://50366151 Reviewed By: vitalybuka Differential Revision: https://reviews.llvm.org/D68676 llvm-svn: 374265
* Change debugserver to use the brk #0 for breakpoints.Jason Molenda2019-10-101-3/+1
| | | | | | | | | | debugserver had been using an instruction that would work for armv7 or aarch64 processes, but we don't have armv7 code running on arm64 devices any more so this is unnecessary. <rdar://problem/56133118> llvm-svn: 374264
* [CUDA][HIP] Fix host/device check with -fopenmpYaxun Liu2019-10-0910-130/+255
| | | | | | | | | | | | | | | | CUDA/HIP program may be compiled with -fopenmp. In this case, -fopenmp is only passed to host compilation to take advantages of multi-threads computation. CUDA/HIP and OpenMP both use Sema::DeviceCallGraph to store functions to be analyzed and remove them once they decide the function is sure to be emitted. CUDA/HIP and OpenMP have different functions to determine if a function is sure to be emitted. To check host/device correctly for CUDA/HIP when -fopenmp is enabled, there needs a unified logic to determine whether a function is to be emitted. The logic needs to be aware of both CUDA and OpenMP logic. Differential Revision: https://reviews.llvm.org/D67837 llvm-svn: 374263
* TestMTCSimple.py: allow the test to run on Darwin embedded platformsFrederic Riss2019-10-093-13/+20
| | | | | | | The test needed some updates to run using a different UI toolkit and with a different libMTC, but it should run fine on a device. llvm-svn: 374262
* Conservatively add volatility and atomic checks in a few placesPhilip Reames2019-10-092-4/+14
| | | | | | | | | | | | As background, starting in D66309, I'm working on support unordered atomics analogous to volatile flags on normal LoadSDNode/StoreSDNodes for X86. As part of that, I spent some time going through usages of LoadSDNode and StoreSDNode looking for cases where we might have missed a volatility check or need an atomic check. I couldn't find any cases that clearly miscompile - i.e. no test cases - but a couple of pieces in code loop suspicious though I can't figure out how to exercise them. This patch adds defensive checks and asserts in the places my manual audit found. If anyone has any ideas on how to either a) disprove any of the checks, or b) hit the bug they might be fixing, I welcome suggestions. Differential Revision: https://reviews.llvm.org/D68419 llvm-svn: 374261
* gn build: Merge r374245GN Sync Bot2019-10-091-0/+1
| | | | llvm-svn: 374260
* [WebAssembly] Fix tests missed in rL374235Thomas Lively2019-10-093-4/+4
| | | | llvm-svn: 374259
* [sanitizer_common] Remove OnPrint from Go build.Matt Morehouse2019-10-091-6/+0
| | | | | | | | | | | | | | | | Summary: Go now uses __sanitizer_on_print instead. Reviewers: vitalybuka, dvyukov Reviewed By: vitalybuka Subscribers: llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D68621 llvm-svn: 374258
* AMDGPU: Don't fold copies to physregsMatt Arsenault2019-10-092-6/+10
| | | | | | | | | | | In a future patch, this will help cleanup m0 handling. The register coalescer handles copies from a register that materializes an immediate, but doesn't handle move immediates itself. The virtual register uses will often be allocated to the same register, so there end up being no real copy. llvm-svn: 374257
* TestIndirectSymbols: Modernize the MakefileFrederic Riss2019-10-092-36/+14
| | | | | | | | This old test used a completely hand-rolled Makefile. Modernize so that it's able to cross-compile. And XFAIL the test as it fails on embedded targets... llvm-svn: 374256
* AMDGPU/GlobalISel: Fix crash on wide constant load with VGPR pointerMatt Arsenault2019-10-092-4/+60
| | | | | | | | | | This was ignoring the register bank of the input pointer, and isUniformMMO seems overly aggressive. This will now conservatively assume a VGPR in cases where the incoming bank hasn't been determined yet (i.e. is from a loop phi). llvm-svn: 374255
* AMDGPU: Relax register classes usedMatt Arsenault2019-10-091-2/+2
| | | | llvm-svn: 374254
* AMDGPU: Fix typosMatt Arsenault2019-10-091-2/+2
| | | | llvm-svn: 374253
* GlobalISel: Implement fewerElementsVector for G_BUILD_VECTORMatt Arsenault2019-10-0931-673/+1359
| | | | | | Turn it into a G_CONCAT_VECTORS of G_BUILD_VECTOR. llvm-svn: 374252
* Makefile.rules: add missing CODESIGN callFrederic Riss2019-10-091-0/+3
| | | | | | | When building an executable and a shared library at the same time (yes, Makefile.rules is setup to do this!) the executable was not codesigned. llvm-svn: 374251
* [lldb] Put site-packages into a sub dir of CMAKE_CFG_INTDIRHaibo Huang2019-10-091-1/+2
| | | | | | | | | | | | | | Summary: Fixes issue like D68719 Reviewers: tatyana-krasnukha Subscribers: mgorny, lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D68728 llvm-svn: 374250
* gn build: (manually) merge r374219Nico Weber2019-10-092-0/+14
| | | | llvm-svn: 374249
* [libc++][test] Miscellaneous MSVC cleanupsCasey Carter2019-10-098-71/+71
| | | | | | | | | | | | * Silence unused-local-typedef warnings: `map.cons/assign_initializer_list.pass.cpp` (and the `set.cons` variant) uses a local typedef only within `LIBCPP_ASSERT`s, so clang diagnoses it as unused when testing non-libc++. * Add missing include: `c.math/abs.pass.cpp` uses `std::numeric_limits` but failed to `#include <limits>`. * Don't test non-type: A "recent" change to `meta.trans.other/underlying_type.pass.cpp` unconditionally tests the type `F` which is conditionally defined. * Use `hash<long long>` instead of `hash<short>` with `int` in `unordered_meow` deduction guide tests to avoid truncation warnings. * Convert `3.14` explicitly in `midpoint.float.pass` since MSVC incorrectly diagnoses `float meow = 3.14;` as truncating. Differential Revision: https://reviews.llvm.org/D68681 llvm-svn: 374248
* Set eRegisterKindEHFrame register numbers for 32 bit ARM register contexts ↵Greg Clayton2019-10-093-11/+88
| | | | | | | | | | in minidumps Stack unwinding was sometimes failing when trying to unwind stacks in 32 bit ARM. I discovered this was because the EH frame register numbers were not set. This patch fixes this issue and adds a unit test to verify this doesn't regress. Differential Revision: https://reviews.llvm.org/D68088 llvm-svn: 374246
* [GISel] Refactor and split PatternMatchTest. NFCMarcello Maggioni2019-10-093-256/+127
| | | | | | | Split the ConstantFold part into a separate file and make it use the fixture GISelMITest. llvm-svn: 374245
* [CMake] Use the correct lit.cfg.pyJonas Devlieghere2019-10-091-1/+1
| | | | llvm-svn: 374244
* [InstCombine] Fix PR43617Evandro Menezes2019-10-091-4/+5
| | | | | | Check for `nullptr` before inspecting composite function. llvm-svn: 374243
* Fix a crasher due to an assert when two files have the same UUID but ↵Greg Clayton2019-10-093-24/+81
| | | | | | | | | | | | | | | | different paths. Summary: The PlaceholderObjectFile has an assert in SetLoadAddress that fires if "m_base == value" is not true. To avoid this, we create check that the base address matches, and if it doesn't we clear the module that was found using the UUID so that we create a new PlaceholderObjectFile. Added a test to cover this issue. Reviewers: labath, aadsm, dvlahovski Subscribers: lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D68106 llvm-svn: 374242
* [AMDGPU] Fixed dpp combine of VOP1Stanislav Mekhanoshin2019-10-092-0/+31
| | | | | | | | | If original instruction did not have source modifiers they were not added to the new DPP instruction as well, even if needed. Differential Revision: https://reviews.llvm.org/D68729 llvm-svn: 374241
* [IRBuilder] Update IRBuilder::CreateFNeg(...) to return a UnaryOperatorCameron McInally2019-10-0928-424/+439
| | | | | | | | Also update Clang to call Builder.CreateFNeg(...) for UnaryMinus. Differential Revision: https://reviews.llvm.org/D61675 llvm-svn: 374240
* remove a smattering of isolated, unnecessary uses of FILE*Lawrence D'Anna2019-10-093-13/+11
| | | | | | | | | | | | | | | | | | Summary: There a a few call sites that use FILE* which are easy to fix without disrupting anything else. Reviewers: JDevlieghere, jasonmolenda, labath Reviewed By: JDevlieghere, labath Subscribers: lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D68444 llvm-svn: 374239
* SBFile support in SBCommandReturnObjectLawrence D'Anna2019-10-0911-40/+144
| | | | | | | | | | | | | | | | | | Summary: This patch add SBFile interfaces to SBCommandReturnObject, and removes the internal callers of its FILE* interfaces. Reviewers: JDevlieghere, jasonmolenda, labath Reviewed By: JDevlieghere Subscribers: lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D68434 llvm-svn: 374238
* SBFile: add a bunch of tests that should eventually work.Lawrence D'Anna2019-10-092-15/+291
| | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: It's really annoying and confusing to have to keep referring back to earlier versions of this SBFile work to find the tests that need to be added for each patch, and not duplicate them with new tests. This patch just imports all my tests. A bunch of them don't work yet, so they are marked to be skipped. They'll be unmarked as I fix them. One of these tests will actually trip an assert in the SWIG code now instead of just failing, so I'm fixing that here too. Reviewers: JDevlieghere, jasonmolenda, labath Reviewed By: JDevlieghere, labath Subscribers: lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D68433 llvm-svn: 374237
* [Reproducer] Add convenience methods IsCapturing and IsReplaying.Jonas Devlieghere2019-10-092-3/+6
| | | | | | | Add convenience methods to the Reproducer class for when you don't need access to the generator and the loader. llvm-svn: 374236
* [WebAssembly] Make returns variadicThomas Lively2019-10-0920-202/+108
| | | | | | | | | | | | | | | | | | Summary: This is necessary and sufficient to get simple cases of multiple return working with multivalue enabled. More complex cases will require block and loop signatures to be generalized to potentially be type indices as well. Reviewers: aheejin, dschuff Subscribers: sbc100, jgravelle-google, hiraditya, sunfish, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D68684 llvm-svn: 374235
* TestHelloWorld: Make compatible with remote testingFrederic Riss2019-10-091-10/+14
| | | | | | The synchronization token handling was not remote-friendly. llvm-svn: 374234
* [SampleFDO] Add indexing for function profiles so they can be loaded on demandWei Mi2019-10-099-58/+207
| | | | | | | | | | | | | | | | | | | | | | | | in ExtBinary format Currently for Text, Binary and ExtBinary format profiles, when we compile a module with samplefdo, even if there is no function showing up in the profile, we have to load all the function profiles from the profile input. That is a waste of compile time. CompactBinary format profile has already had the support of loading function profiles on demand. In this patch, we add the support to load profile on demand for ExtBinary format. It will work no matter the sections in ExtBinary format profile are compressed or not. Experiment shows it reduces the time to compile a server benchmark by 30%. When profile remapping and loading function profiles on demand are both used, extra work needs to be done so that the loading on demand process will take the name remapping into consideration. It will be addressed in a follow-up patch. Differential Revision: https://reviews.llvm.org/D68601 llvm-svn: 374233
* llvm-dwarfdump: Support multiple debug_loclists contributionsDavid Blaikie2019-10-097-19/+66
| | | | | | | Also fixing the incorrect "offset" field being computed/printed for each location list. llvm-svn: 374232
* [LLDB] Fix for regression of test 'TestDataFormatterInvalidStdUniquePtr.py' ↵Cameron Desrochers2019-10-093-5/+7
| | | | | | | | introduced in r374195 Differential Revision: https://reviews.llvm.org/D68641 llvm-svn: 374231
* [Docs] Adds section for Additional Topics on Reference pageDeForest Richards2019-10-092-74/+78
| | | | | | Adds a new section for Additional Topics on the Reference documentation page. Also moves Support Library topic to User Guides page. llvm-svn: 374230
* [LLDB] Remove standalone build dep on llvm-stripJonas Devlieghere2019-10-091-1/+6
| | | | | | | | | | | | When building standalone, since llvm-strip is a symlink, it is created using add_custom_command/add_custom_target which cannot be exported, and thus cannot be depended on by lldb. Patch by: Gwen Mittertreiner Differential revision: https://reviews.llvm.org/D68614 llvm-svn: 374229
* [libFuzzer] Fix Alarm callback in fuchsia.Jake Ehrlich2019-10-091-2/+2
| | | | | | | | | | | | | | | | This patch adds an #if macro to skip the InFuzzingThread() comparison for fuchsia, similar to what it is done for Windows and NetBSD. In fuchsia, the alarm callback runs in a separate thread[0], making it fail the comparison InFuzzingThread(), breaking the -timeout flag. [0]: https://github.com/llvm/llvm-project/blob/master/compiler-rt/lib/fuzzer/FuzzerUtilFuchsia.cpp#L323 Author: charco (aka Marco Vanotti) Differential Revision: https://reviews.llvm.org/D68166 llvm-svn: 374228
* Revert "[lldb] Calculate relative path for symbol links"Jim Ingham2019-10-091-4/+19
| | | | | | | | | | | | | | | | | | | | | | | This reverts commit 958091c209d0a92e38b9cb27fb77a0ff7da11853. This commit incorrectly sets the _lldb.so symlink (at least it does when building in Stefans' two build directory mode, where you build llvm with cmake/ninja and lldb with cmake/Xcode, using a cmake generated project. The _lldb.so link is SUPPOSED to point to: bin/LLDB.framework/Versions/A/LLDB but instead it points to bin/LLDB which is where LLDB was staged to before constructing the framework. This causes all sorts of problems when we then build the lldb driver into bin - remember that MacOS is a case-preserving but case insensitive filesystem - so when we later go to dlopen _lldb.so, we dlopen the main executable instead. llvm-svn: 374226
* allow arbitrary python streams to be converted to SBFileLawrence D'Anna2019-10-096-33/+813
| | | | | | | | | | | | | | | | | | | | | | | | Summary: This patch adds SWIG typemaps that can convert arbitrary python file objects into lldb_private::File. A SBFile may be initialized from a python file using the constructor. There are also alternate, tagged constructors that allow python files to be borrowed, and for the caller to control whether or not the python I/O methods will be called even when a file descriptor is available.I Reviewers: JDevlieghere, jasonmolenda, labath Reviewed By: labath Subscribers: zturner, amccarth, lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D68188 llvm-svn: 374225
* [OPENMP50]Fix scoring of contexts with and without user provided scores.Alexey Bataev2019-10-092-4/+4
| | | | | | | The context selector with user provided score must have higher score than the context selector without user provided score. llvm-svn: 374224
* [sanitizer, NFC] Fix grammar in commentVitaly Buka2019-10-091-1/+1
| | | | llvm-svn: 374223
* [System Model] [TTI] Define AMDGPUTTIImpl::getST and AMDGPUTTIImpl::getTLIVitaly Buka2019-10-091-2/+10
| | | | | | To fix "infinite recursion" warning. llvm-svn: 374222
* [System Model] [TTI] Fix virtual destructor warningVitaly Buka2019-10-091-0/+1
| | | | llvm-svn: 374221
* [sanitizer] Disable signal_trap_handler on s390Vitaly Buka2019-10-091-0/+5
| | | | llvm-svn: 374220
* [Clang][OpenMP Offload] Add new tool for wrapping offload device binariesSergey Dmitriev2019-10-0918-265/+518
| | | | | | | | | | This patch removes the remaining part of the OpenMP offload linker scripts which was used for inserting device binaries into the output linked binary. Device binaries are now inserted into the host binary with a help of the wrapper bit-code file which contains device binaries as data. Wrapper bit-code file is dynamically created by the clang driver with a help of new tool clang-offload-wrapper which takes device binaries as input and produces bit-code file with required contents. Wrapper bit-code is then compiled to an object and resulting object is appended to the host linking by the clang driver. This is the second part of the patch for eliminating OpenMP linker script (please see https://reviews.llvm.org/D64943). Differential Revision: https://reviews.llvm.org/D68166 llvm-svn: 374219
* Skip Apple simulator test for all remote testing scenarios.Frederic Riss2019-10-091-3/+3
| | | | | | | The test makes no sense to run remotely, period. The architecture of the target is not the discriminant here. llvm-svn: 374217
* [CMake] Fix add_lldb_test_dependencyJonas Devlieghere2019-10-092-10/+12
| | | | | | | This function would ignore all but the first argument. Now it correctly adds every dependency by iterating over its arguments. llvm-svn: 374216
* [utils] Update lldb-dotest for new test layoutJonas Devlieghere2019-10-091-1/+1
| | | | | | The path to dotest.py changed after the test directory reorganization. llvm-svn: 374215
OpenPOWER on IntegriCloud