summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* [LLDB] [Windows] Fix Windows-specific race condition in LLDB for session ↵Martin Storsjö2019-10-314-10/+95
| | | | | | | | | | | | | | | lifetime This can e.g. happen if the debugged executable exits before the initial stop, e.g. if it fails to load dependent DLLs. Add a virtual destructor to ProcessDebugger and let it clean up the session, and make ProcessWindows::OnExitProcess call ProcessDebugger::OnExitProcess for shared parts. Fix suggestion by Adrian McCarthy. Differential Revision: https://reviews.llvm.org/D69503
* [LLDB] [PECOFF] Fix error handling for executables that object::createBinary ↵Martin Storsjö2019-10-312-6/+90
| | | | | | | | | | | | | | errors out on llvm::object::createBinary returns an Expected<>, which requires not only checking the object for success, but also requires consuming the Error, if one was set. Use LLDB_LOG_ERROR for this case, and change an existing similar log statement to use it as well, to make sure the Error is consumed even if the log channel is disabled. Differential Revision: https://reviews.llvm.org/D69646
* [LLDB] [Windows] Remove a TODO which probably won't be implementedMartin Storsjö2019-10-311-2/+0
| | | | | | | | | | | | | Contrary to WoW64 on x86_64, there's no struct similar to WOW64_CONTEXT defined, for storing and handling the CPU state of an ARM32 process from an ARM64 process. Thus, making an ARM64 lldb-server able to control ARM32 processes seems infeasible at the moment. (The normal CONTEXT struct has a different layout on each architecture. In addition to this, a WOW64_CONTEXT struct always is defined, that can store the CPU state of an x86_32 process, to allow handling it from an x86_64 process. But there's no similar universally available struct for ARM32.)
* [LLDB] [PECOFF] Don't crash in ReadImageDataByRVA for addresses out of rangeMartin Storsjö2019-10-314-1/+133
| | | | | | This can happen e.g. when unwinding doesn't work perfectly. Differential Revision: https://reviews.llvm.org/D69502
* Revert "[SLP] Vectorize jumbled stores."Haojian Wu2019-10-313-98/+25
| | | | | | This reverts commit 21d498c9c0f32dcab5bc89ac593aa813b533b43a. This commit causes some crashes on some targets.
* [llvm-readelf/llvm-readobj] - Improve dumping of broken versioning sections.Georgii Rymar2019-10-312-44/+333
| | | | | | | | This updates the elf-invalid-versioning.test test case: makes a cleanup, adds llvm-readobj calls and fixes 2 crash/assert issues I've found (test cases are provided). Differential revision: https://reviews.llvm.org/D68705
* [Diagnostics] Warn for std::is_constant_evaluated in constexpr modeDávid Bolvanský2019-10-314-2/+78
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: constexpr int fn1() { if constexpr (std::is_constant_evaluated()) // condition is always true! return 0; else return 1; } constexpr int fn2() { if (std::is_constant_evaluated()) return 0; else return 1; } Solves PR42977 Reviewers: rsmith, aaron.ballman Reviewed By: rsmith Subscribers: cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D69518
* [MustExecute] Silence clang warning about unused captured 'this'Mikael Holmen2019-10-311-2/+2
| | | | | | | | | | | | New code introduced in fe799c97fa caused clang to complain with ../lib/Analysis/MustExecute.cpp:360:34: error: lambda capture 'this' is not used [-Werror,-Wunused-lambda-capture] GetterTy<LoopInfo> LIGetter = [this](const Function &F) { ^~~~ ../lib/Analysis/MustExecute.cpp:365:44: error: lambda capture 'this' is not used [-Werror,-Wunused-lambda-capture] GetterTy<PostDominatorTree> PDTGetter = [this](const Function &F) { ^~~~ 2 errors generated.
* [clangd] Add parameter renaming to define-inline code actionKadir Cetinkaya2019-10-312-7/+177
| | | | | | | | | | | | | | | | | Summary: When moving a function definition to declaration location we also need to handle renaming of the both function and template parameters. This patch achives that by making sure every parameter name and dependent type in destination is renamed to their respective name in the source. Reviewers: ilya-biryukov Subscribers: MaskRay, jkorous, arphaman, usaxena95, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D68937
* [libunwind] [Windows] Add a log message if EnumProcessModules failsMartin Storsjö2019-10-311-1/+5
| | | | Differential Revision: https://reviews.llvm.org/D69504
* [Attributor][NFCI] Improve the usage of IntegerStatesJohannes Doerfert2019-10-313-42/+48
| | | | | Setting the upper bound directly in the state can be beneficial and simplifies the logic. This also exposed more copy&paste type errors.
* [Attributor][FIX] Unbreak buildbot through test correctionJohannes Doerfert2019-10-311-10/+23
|
* [Attributor] Make liveness "edge-based"Johannes Doerfert2019-10-3110-145/+280
| | | | | | | | | | | | | | | | Summary: If control is transferred to a successor is the key question when it comes to liveness. The new implementation puts that question in the focus and thereby providing a clean way to assume certain CFG edges are dead or instructions will not transfer control. Reviewers: sstefan1, uenoku Subscribers: hiraditya, bollu, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D69605
* [llvm-objcopy][MachO] Implement --strip-allSeiya Nuta2019-10-317-8/+873
| | | | | | | | | | | | Reviewers: alexshap, rupprecht, jdoerfert, jhenderson Reviewed By: alexshap Subscribers: jakehehrlich, abrachet, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D66281
* [Attributor] Liveness for valuesJohannes Doerfert2019-10-3110-71/+565
| | | | | | | | | | | | | | | | | | | | | | | Summary: This patch introduces liveness (AAIsDead) for all positions, thus for all kinds of values. For now, we say an instruction is dead if it would be removed assuming all users are dead. A call site return is different as we just look at the users. If all call site returns have been eliminated, the return values can return undef instead of their original value, eliminating uses. We try to recursively delete dead instructions now and we introduce a simple check interface for use-traversal. This is the idea tried out in D68626 but implemented in the right way. Reviewers: uenoku, sstefan1 Subscribers: hiraditya, bollu, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D68925
* [Attributor][NFC] Do not delete dead blocks but "clear" themJohannes Doerfert2019-10-312-6/+6
| | | | | | | Deleting blocks will require us to deal with dead edges, e.g., `br i1 false, label %live, label %dead` explicitly. For now we just clear the blocks and move on. This will be revisited once we actually fold branches.
* [MustExecute] Forward iterate over conditional branchesJohannes Doerfert2019-10-314-16/+556
| | | | | | | | | | | | | | | | | | | Summary: If a conditional branch is encountered we can try to find a join block where the execution is known to continue. This means finding a suitable block, e.g., the immediate post dominator of the conditional branch, and proofing control will always reach that block. This patch implements different techniques that work with and without provided analysis. Reviewers: uenoku, sstefan1, hfinkel Subscribers: hiraditya, bollu, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D68933
* comment typo fix to cycle botsNico Weber2019-10-301-2/+2
|
* [libomptarget] Change nvcc compilation to use a unity buildJon Chesterfield2019-10-312-1/+26
| | | | | | | | | | | | | | | | | | | | | | Summary: [libomptarget] Change nvcc compilation to use a unity build This allows nvcc to inline functions between what would otherwise be distinct translation units, which in turn removes any runtime cost from implementing functions in source files (as opposed to inline in headers). This will then allow the circular dependencies in deviceRTL to be readily broken and individual components more easily shared between architectures. Reviewers: ABataev, jdoerfert, grokos, RaviNarayanaswamy, hfinkel, ronlieb, gregrodgers Reviewed By: jdoerfert Subscribers: mgorny, openmp-commits Tags: #openmp Differential Revision: https://reviews.llvm.org/D69489
* [Attributor] Add "free"-based heap2stack deductionJohannes Doerfert2019-10-304-32/+101
| | | | | | | | | | | | | | | Summary: If there is a unique free of the allocated that has to be reached from the malloc, we can apply the heap-2-stack transformation even if the pointer escapes. Reviewers: hfinkel, sstefan1, uenoku Subscribers: hiraditya, bollu, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D68958
* [AArch64][SVE] Add patterns for some integer vector instructionsEhsan Amiri2019-10-307-40/+595
| | | | | | | | | | | | Add pattern matching for SVE vector instructions: -- add, sub, and, or, xor instructions -- sqadd, uqadd, sqsub, uqsub target-independent intrinsics -- bic intrinsics -- predicated add, sub, subr intrinsics Patch Review: https://reviews.llvm.org/D69128 Patch authored by: dancgr (Danilo Carvalho Grael)
* [Attributor][NFC] Eagerly mark attributes as fixed.Johannes Doerfert2019-10-302-4/+17
| | | | | | If an attribute did not query any optimistic (=non-fixed) information to justify its state, we know the attribute state will not change anymore. Thus, we can indicate an optimistic fixpoint.
* [Attributor][NFC] Do not record dependences on fixed attributesJohannes Doerfert2019-10-302-5/+9
| | | | | Since fixed values cannot change, we do not need to wait for it to happen, we will never notify the dependent attribute anyway.
* [Attributor][NFC] Simplify the IRPosition interfaceJohannes Doerfert2019-10-302-68/+16
| | | | | | | We pretended IRPosition came either as mutable or immutable objects while they are basically always immutable, with a single (existing) unfortunate exceptions. This patch cleans up the uses to deal with the immutable version.
* [Attributor] Automatically deal with undef values for IRAttributesJohannes Doerfert2019-10-301-2/+4
| | | | | | For (almost) all IRAttribute we can derive whatever we want for undef values so it makes sense to provide this functionality in the base class. At the same time, we probably do not want to annotate them.
* [Utils] Allow update_test_checks to check function informationJohannes Doerfert2019-10-304-14/+52
| | | | | | | | | | | | | | | | | | | Summary: This adds a switch to the update_test_checks that triggers arguments and other function annotations, e.g., personality, to be present in the check line. If not set, the behavior should be the same as before. If arguments are recorded, their names are scrubbed from the IR to allow merging. This patch includes D68153. Reviewers: lebedev.ri, greened, spatel, xbolva00, RKSimon, mehdi_amini Subscribers: bollu, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D68819
* [GISel][CombinerHelper] Combine shuffle_vector scalar to build_vectorQuentin Colombet2019-10-302-2/+65
| | | | | | | | | | Teach the combiner helper how to replace shuffle_vector of scalars into build_vector. I am not particularly happy about having to add this combine, but we currently get those from <1 x iN> from the IR. Bonus: This fixes an assert in the shuffle_vector combines since before this patch, we were expecting vector types.
* [clang-tidy] Regenerate clang-tidy check list 📋Stephane Moore2019-10-301-65/+64
| | | | | | | | | | | | | | | | | Summary: These changes were generated by invoking clang-tools-extra/clang-tidy/add_new_check.py and then reverting the check that was added. Reviewers: aaron.ballman Reviewed By: aaron.ballman Subscribers: xazax.hun, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D69414
* Run clang-format on lib/CodeGen/CGCall.h and fix indentationAkira Hatanaka2019-10-301-308/+304
|
* Only ask once if we have no commands. NFC.Jim Ingham2019-10-301-7/+5
|
* [ThinLTO/WPD] Fix index-based WPD for available_externally vtablesTeresa Johnson2019-10-305-8/+227
| | | | | | | | | | | | | | | | | | | | | | Summary: Clang does not add type metadata to available_externally vtables. When choosing a summary to look at for virtual function definitions, make sure we skip summaries for any available externally vtables as they will not describe any virtual function functions, which are only summarized in the presence of type metadata on the vtable def. Simply look for the corresponding strong def's summary. Also add handling for same-named local vtables with the same GUID because of same-named files without enough distinguishing path. In that case we return a conservative result with no devirtualization. Reviewers: pcc, davidxl, evgeny777 Subscribers: mehdi_amini, inglorion, hiraditya, steven_wu, dexonsmith, arphaman, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D69452
* [JITLink] Move block ownership from LinkGraph to Section.Lang Hames2019-10-303-44/+152
| | | | This enables easy iteration over blocks in a specific section.
* Revert "[CodeView] Add option to disable inline line tables."Amy Huang2019-10-3010-177/+11
| | | | | | because it breaks compiler-rt tests. This reverts commit 6d03890384517919a3ba7fe4c35535425f278f89.
* [CodeView] Add option to disable inline line tables.Amy Huang2019-10-3010-11/+177
| | | | | | | | | | | | | | | | | Summary: This adds a clang option to disable inline line tables. When it is used, the inliner uses the call site as the location of the inlined function instead of marking it as an inline location with the function location. See https://bugs.llvm.org/show_bug.cgi?id=42344 Reviewers: rnk Subscribers: hiraditya, cfe-commits, llvm-commits Tags: #clang, #llvm Differential Revision: https://reviews.llvm.org/D67723
* [lit] Add missing importReid Kleckner2019-10-301-0/+1
| | | | Apparently llvm-lit.py does not execute this path
* Revert "[Builtins] Downgrade duplicate source file warning from a fatal ↵Dan Liew2019-10-301-3/+1
| | | | | | | | | error to a warning." This reverts commit dc748816e2aec8941d63f8ad07fb82aff6be8af7. Now that 8ea148dc0cbff33ac3c80cf4273991465479a01e has landed it should be safe to turning the warning back into a fatal error.
* [Builtins] Fix bug where powerpc builtins specializations didn't remove ↵Dan Liew2019-10-301-11/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | generic implementations. Summary: Previously the CMake code looked for filepaths of the form `<arch>/<filename>` as an indication that `<arch>/<filename>` provided a specialization of a top-level file `<filename>`. For powerpc there was a bug because the powerpc specialized implementations lived in `ppc/` but the architectures were `powerpc64` and `powerpc64le` which meant that CMake was looking for files at `powerpc64/<filename>` and `powerpc64le/<filename>`. The result of this is that for powerpc the builtins library contained a duplicate symbol for `divtc3` because it had the generic implementation and the specialized version in the built static library. Although we could just add similar code to what there is for arm (i.e. compute `${_arch}`) to fix this, this is extremely error prone (until r375150 no error was raised). Instead this patch takes a different approach that removes looking for the architecture name entirely. Instead this patch uses the convention that a source file in a sub-directory might be a specialization of a generic implementation and if a source file of the same name (ignoring extension) exists at the top-level then it is the corresponding generic implementation. This approach is much simpler because it doesn't require keeping track of different architecture names. This convention already existed in repository but previously it was implicit. This change makes it explicit. This patch is motivated by wanting to revert r375162 which worked around the powerpc bug found when r375150 landed. Once it lands we should revert r375162. Reviewers: phosek, beanz, compnerd, shiva0217, amyk, rupprecht, kongyi, mstorsjo, t.p.northover, weimingz, jroelofs, joerg, sidneym Subscribers: nemanjai, mgorny, kristof.beyls, jsji, shchenz, steven.zhang, #sanitizers, llvm-commits Tags: #llvm, #sanitizers Differential Revision: https://reviews.llvm.org/D69189
* [InstCombine] keep assumption before sinking callstyker2019-10-312-2/+213
| | | | | | | | | | | | | | | | | | | | | | | | | | Summary: in the following C code the branch is not removed by clang in O3. ``` int f1(char* p) { int i1 = __builtin_strlen(p); if (!p) return -1; return i1; } ``` The issue is that the call to strlen is sunk to the following block by instcombine. In its new place the call to strlen doesn't dominate the use in the icmp anymore so value tracking can't see that p cannot be null. This patch resolves the issue by inserting an assumption at the place of the call before sinking a call when that call can be used to prove an argument to be nonnull. This resolves this issue at O3. Reviewers: majnemer, xbolva00, fhahn, jdoerfert, spatel, efriedma Reviewed By: jdoerfert Subscribers: hiraditya, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D69477
* [lit] Silence warning about importing the resource module on WindowsReid Kleckner2019-10-301-1/+3
| | | | | lit was printing this warning on every test run on Windows, and that is not necessary.
* Run clang-format on lldb/source/Commands (NFC)Adrian Prantl2019-10-3023-443/+385
| | | | | These files had a lot of whitespace errors in them which was a constant source of merge conflicts downstream.
* [clang][ScanDeps] Fix shadowing warning.Michael Spencer2019-10-301-5/+5
|
* [libc++] Add test and remove workaround for PR13592Louis Dionne2019-10-302-5/+10
| | | | | | | | PR13592 was caused by a problem in how to compiler implemented the __is_convertible_to intrinsic. That problem, reported as PR13591, was fixed back in 2012. We don't support such old versions of Clang anyway, so we don't need the library workaround that had been added to solve PR13592 (while waiting for the compiler fix).
* Disable new clang-scan-deps test on Windows due to backslash path matching ↵Reid Kleckner2019-10-301-0/+3
| | | | problems
* gn build: Merge 33a745e6fe7LLVM GN Syncbot2019-10-301-0/+1
|
* [clang][clang-scan-deps] Add support for extracting full module dependencies.Michael Spencer2019-10-3011-25/+470
| | | | | | | | | | | This is a recommit of d8a4ef0e685c with the nondeterminism fixed. This adds experimental support for extracting a Clang module dependency graph from a compilation database. The output format is experimental and will change. It is currently a concatenation of JSON outputs for each compilation. Future patches will change this to deduplicate modules between compilations. Differential Revision: https://reviews.llvm.org/D69420
* Fix -Wsign-compare warning with clang-clReid Kleckner2019-10-301-2/+2
| | | | | | off_t apparently is just "long" on Win64, which is 32-bits, and therefore not long enough to compare with UINT32_MAX. Use auto to follow the surrounding code. uint64_t would also be fine.
* Revert "[clang][clang-scan-deps] Add support for extracting full module ↵Michael Spencer2019-10-3011-470/+25
| | | | | | | | dependencies." This reverts commit d8a4ef0e685cec1fc73d4953b48220b649d05b40. This commit broke some of the bots. I believe it's due to nondeterminism. Will fix and recommit.
* [lit] Change progress bar color to red on first failureJulian Lettner2019-10-302-3/+8
|
* [lit] Add helper for `test.result.code.isFailure`Julian Lettner2019-10-303-12/+13
|
* [lit] Extract `_install_win32_signal_handler` functionJulian Lettner2019-10-301-9/+12
|
OpenPOWER on IntegriCloud