summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* [lldb][NFC] Move Address and AddressRange functions out of Stream and let ↵Raphael Isemann2019-12-0517-134/+149
| | | | | | | | | | | | | | | | | | | | | | them take raw_ostream Summary: Yet another step on the long road towards getting rid of lldb's Stream class. We probably should just make this some kind of member of Address/AddressRange, but it seems quite often we just push in random integers in there and this is just about getting rid of Stream and not improving arbitrary APIs. I had to rename another `DumpAddress` function in FormatEntity that is dumping the content of an address to make Clang happy. Reviewers: labath Reviewed By: labath Subscribers: JDevlieghere, lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D71052
* Also check /Fo when deciding on the .gcna / .gcda filename (PR44208)Hans Wennborg2019-12-052-1/+6
| | | | Differential revision: https://reviews.llvm.org/D71012
* [InstCombine] Extend `0 - (X sdiv C) -> (X sdiv -C)` fold to non-splat vectorsRoman Lebedev2019-12-054-15/+43
| | | | Split off from https://reviews.llvm.org/D68408
* [AST] Enable expression of OpenCL language address spaces an attributeVictor Lomuller2019-12-054-8/+70
| | | | | | | | | | | | | | | | | | Summary: Enable a way to set OpenCL language address space using attributes in addition to existing keywords. Signed-off-by: Victor Lomuller victor@codeplay.com Reviewers: aaron.ballman, Anastasia Subscribers: yaxunl, ebevhan, cfe-commits, Naghasan Tags: #clang Differential Revision: https://reviews.llvm.org/D71005 Signed-off-by: Alexey Bader <alexey.bader@intel.com>
* [lldb/DWARF] Switch to llvm debug_rnglists parserPavel Labath2019-12-059-231/+157
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Our rnglist support was working only for the trivial cases (one CU), because we only ever parsed one contribution out of the debug_rnglists section. This means we were never able to resolve range lists for the second and subsequent units (DW_FORM_sec_offset references came out blang, and DW_FORM_rnglistx references always used the ranges lists from the first unit). Since both llvm and lldb rnglist parsers are sufficiently self-contained, and operate similarly, we can fix this problem by switching to the llvm parser instead. Besides the changes which are due to variations in the interface, the main thing is that now the range list object is a member of the DWARFUnit, instead of the entire symbol file. This ensures that each unit can get it's own private set of range list indices, and is consistent with how llvm's DWARFUnit does it (overall, I've tried to structure the code the same way as the llvm version). I've also added a test case for the two unit scenario. Reviewers: JDevlieghere, aprantl, clayborg Subscribers: dblaikie, lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D71021
* Reapply af57dbf12e54 "Add support for options -frounding-math, ↵Melanie Blower2019-12-0525-23/+638
| | | | | | | | | | | | ftrapping-math, -ffp-model=, and -ffp-exception-behavior=" Patch was reverted because https://bugs.llvm.org/show_bug.cgi?id=44048 The original patch is modified to set the strictfp IR attribute explicitly in CodeGen instead of as a side effect of IRBuilder. In the 2nd attempt to reapply there was a windows lit test fail, the tests were fixed to use wildcard matching. Differential Revision: https://reviews.llvm.org/D62731
* [lldb/cpluspluslanguage] Add constructor substitutorPavel Labath2019-12-052-41/+84
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This patch adds code which will substitute references to the full object constructors/destructors with their base object versions. Like all substitutions in this category, this operation is not really sound, but doing this in a more precise way allows us to get rid of a much larger hack -- matching function according to their demangled names, which effectively does the same thing, but also much more. This is a (very late) follow-up to D54074. Background: clang has an optimization which can eliminate full object structors completely, if they are found to be equivalent to their base object versions. It does this because it assumes they can be regenerated on demand in the compile unit that needs them (e.g., because they are declared inline). However, this doesn't work for the debugging scenario, where we don't have the structor bodies available -- we pretend all constructors are defined out-of-line as far as clang is concerned. This causes clang to emit references to the (nonexisting) full object structors during expression evaluation. Fun fact: This is not a problem on darwin, because the relevant optimization is disabled to work around a linker bug. Reviewers: teemperor, JDevlieghere Subscribers: lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D70721
* [llvm/DWARF] Return section offset from DWARFUnit::get{Loc,Rng}listOffsetPavel Labath2019-12-057-12/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Currently these function return the raw content of the appropriate table header, which means they are relative to the DW_AT_{loc,rng}list_base, and one has to relocate them in order to do anything. This changes the functions to perform the relocation themselves, which seems more clearer, particularly as they are sitting right next to the find{Rng,Loc}listFromOffset functions, but one *cannot* simply take the result of these functions and take pass them there. The only effect of this patch is to change what value is dumped for the DW_AT_ranges attribute, which I think is for the better, as previously the values appeared to point into thin air. (The main reason I am looking at this is because I was trying to implement equivalent functionality in lldb's DWARFUnit, and was stumped by this behavior. Reviewers: dblaikie, JDevlieghere, aprantl Subscribers: hiraditya, llvm-commits, SouraVX Tags: #llvm Differential Revision: https://reviews.llvm.org/D71006
* [LiveDebugValues] Silence the unused var warning; NFCDjordje Todorovic2019-12-051-2/+1
|
* [clangd] More unittests for cross-file rename.Haojian Wu2019-12-052-2/+153
| | | | | | | | | | | | | | | | | Summary: The previous unittests for cross-file rename was kind of weak. With this patch, we should have more test coverage, and it is easy to add more tests in the future. Reviewers: ilya-biryukov, kbobyrev Reviewed By: ilya-biryukov Subscribers: merge_guards_bot, MaskRay, jkorous, arphaman, kadircet, usaxena95, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D71050
* [DebugInfo] Handle call site values for instructions before call bundleDavid Stenberg2019-12-052-0/+191
| | | | | | | | | | | | | | | | | | | | | | | Summary: If a call is bundled then the code that looks for instructions that produce parameter values would break when reaching the call's bundle header, due to the `ifCall(/*AnyInBundle*/)` invocation returning true. It is not enough to simply ignore bundle headers in the `isCall()` invocation, as the bundle header may have defines of parameter registers due to the call, meaning that such registers would incorrectly be removed from the worklist. Therefore, do not look at bundle headers at all. Reviewers: djtodoro, NikolaPrica, aprantl, vsk Reviewed By: aprantl, vsk Subscribers: hiraditya, llvm-commits Tags: #debug-info, #llvm Differential Revision: https://reviews.llvm.org/D71024
* Fix the clang interpreter example which was broken by 4fc68b9b7f3e0.Lang Hames2019-12-051-3/+4
|
* [lldb] Don't put compile unit name into the support file list and support ↵Pavel Labath2019-12-055-45/+163
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | DWARF5 line tables Summary: Lldb's "format-independent" debug info made use of the fact that DWARF (<=4) did not use the file index zero, and reused the support file index zero for storing the compile unit name. While this provided some convenience for DWARF<=4, it meant that the PDB plugin needed to artificially remap file indices in order to free up index 0. Furthermore, DWARF v5 make file index 0 legal, which meant that similar remapping would be needed in the dwarf plugin too. What this patch does instead is remove the requirement of having the compile unit name in the index 0. It is not that useful since the name can always be fetched from the CompileUnit object. Remapping code in the pdb plugin(s) has been removed or simplified. DWARF plugin has started inserting an empty FileSpec at index 0 to ensure the indices keep matching up (in case of DWARF<=4). For DWARF5, we insert the file 0 from the line table. I add a test to ensure we can correctly lookup line table entries referencing file 0, and in particular the case where the file 0 is also duplicated in another file entry, as this is how clang produces line tables in some circumstances (see pr44170). Though this is probably a bug in clang, this is not forbidden by DWARF, and lldb already has support for that in some (but not all) cases -- this adds a test for the code path which was not fixed in this patch. Reviewers: clayborg, JDevlieghere, jdoerfert Subscribers: aprantl, lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D70954
* [AArch64][SVE] Implement element count intrinsicsCullen Rhodes2019-12-054-7/+136
| | | | | | | | | | | | | | | | | | | | | Summary: Adds intrinsics for the following: * cntb * cnth * cntw * cntd * cntp Reviewers: sdesmalen, huntergr, dancgr, rengolin, efriedma, rovka Reviewed By: efriedma Subscribers: tschuett, kristof.beyls, hiraditya, rkruppe, psnobl, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D70967
* [LLD][ELF][AArch64] .note.gnu.property sections should have alignment 8Peter Smith2019-12-054-4/+86
| | | | | | | | | | | The .note.gnu.property SHT_NOTE sections on AArch64 (a 64-bit target) should have alignment 8 to more closely match the binutils implementation where alignment is 4-bytes on 32-bit machines and 8-bytes on 64-bit machines. Previously LLD was using 4 for both 32-bit and 64-bit machines. Differential Revision: https://reviews.llvm.org/D70962
* Reland "[LiveDebugValues] Introduce entry values of unmodified params"Djordje Todorovic2019-12-059-97/+1041
| | | | Relanding this after resolving the cause of the test failure.
* [Checkers] Added support for freopen to StreamChecker.Balázs Kéri2019-12-052-0/+87
| | | | | | | | | | | | | | Summary: Extend StreamChecker with a new evaluation function for API call 'freopen'. Reviewers: NoQ, baloghadamsoftware, Szelethus, martong Reviewed By: baloghadamsoftware, martong Subscribers: martong, rnkovacs, dkrupp, Szelethus, gamesh411, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D69948
* [LLD][ELF] Add support for PT_GNU_PROPERTYPeter Smith2019-12-056-222/+273
| | | | | | | | | | The PT_GNU_PROPERTY program header describes the location of the .note.gnu.property SHT_NOTES section. The linux kernel uses this program header to find the .note.gnu.property section rather than parsing. Executables that have properties that the kernel needs to act on that don't have the PT_GNU_PROPERTY program header will not boot. Differential Revision: https://reviews.llvm.org/D70961
* [clangd] Fix an incorrect comment, NFC.Haojian Wu2019-12-051-1/+1
|
* [ORC] Remove the automagic Main JITDylib fram ExecutionSession.Lang Hames2019-12-059-47/+38
| | | | | | | | | | | | This patch removes the magic "main" JITDylib from ExecutionEngine. The main JITDylib was created automatically at ExecutionSession construction time, and all subsequently created JITDylibs were added to the main JITDylib's links-against list by default. This saves a couple of lines of boilerplate for simple JIT setups, but this isn't worth introducing magical behavior for. ORCv2 clients should now construct their own main JITDylib using ExecutionSession::createJITDylib and set up its linkages manually using JITDylib::setSearchOrder (or related methods in JITDylib).
* [MCRegInfo] Add forward sub and super register iterators. (NFC)Florian Hahn2019-12-055-42/+133
| | | | | | | | | | | | | | | | | | | This patch adds forward iterators mc_difflist_iterator, mc_subreg_iterator and mc_superreg_iterator, based on the existing DiffListIterator. Those are used to provide iterator ranges over sub- and super-register from TRI, which are slightly more convenient than the existing MCSubRegIterator/MCSuperRegIterator. Unfortunately, it duplicates a bit of functionality, but the new iterators are a bit more convenient (and can be used with various existing iterator utilities) and should probably replace the old iterators in the future. This patch updates some existing users. Reviewers: evandro, qcolombet, paquette, MatzeB, arsenm Reviewed By: qcolombet Differential Revision: https://reviews.llvm.org/D70565
* [MIBundle] Turn MachineOperandIteratorBase into a forward iterator.Florian Hahn2019-12-052-12/+62
| | | | | | | | | | | | | | | This patch turns MachineOperandIteratorBase into a regular forward iterator, which can be used with iterator_range. It also adds mi_bundle_ops and const_mi_bundle_ops that return iterator ranges over all operands in a bundle and updates a use of the old iterator. Reviewers: evandro, t.p.northover, paquette, MatzeB, arsenm Reviewed By: arsenm Differential Revision: https://reviews.llvm.org/D70561
* Avoid triple corruption while merging core infoMuhammad Omair Javaid2019-12-052-1/+36
| | | | | | | | | | | | | | | | | | | | | | | Summary: This patch fixes a bug where when target triple created from elf information is arm-*-linux-eabihf and platform triple is armv8l-*-linux-gnueabihf. Merging both triple results in armv8l--unknown-unknown. This happens because we order a triple update while calling CoreUpdated and CoreUpdated creates a new triple with no vendor or environment information. Making sure we do not update triple and just update to more specific core fixes the issue. Reviewers: labath, jasonmolenda, clayborg Reviewed By: jasonmolenda Subscribers: jankratochvil, kristof.beyls, lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D70155
* [llvm-readelf/llvm-readobj] - Remove getSecTypeName() helper.Georgii Rymar2019-12-051-16/+10
| | | | | | | We do not need it, we have `object::getELFSectionTypeName` that can be used instead. Differential revision: https://reviews.llvm.org/D71017
* Fix the macro fusion table for X86 according to Intel optimizationShengchen Kan2019-12-052-171/+254
| | | | | | manual and add function isMacroFused Differential Revision: https://reviews.llvm.org/D70999
* Reland [MachineCopyPropagation] Extend MCP to do trivial copy backward ↵Kai Luo2019-12-0511-72/+279
| | | | | | | | | | propagation. Fix assertion error ``` bool llvm::MachineOperand::isRenamable() const: Assertion `Register::isPhysicalRegister(getReg()) && "isRenamable should only be checked on physical registers"' failed. ``` by checking if the register is 0 before invoking `isRenamable`.
* Revert "Properly convert all declaration non-type template arguments when"David L. Jones2019-12-043-100/+92
| | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 11d10527852b4d3ed738aa90d8bec0f398160593. This change is problematic with function pointer template parameters. For example, building libcxxabi with futexes (-D_LIBCXXABI_USE_FUTEX) produces this diagnostic: In file included from .../llvm-project/libcxxabi/src/cxa_guard.cpp:15: .../llvm-project/libcxxabi/src/cxa_guard_impl.h:416:54: error: address of function 'PlatformThreadID' will always evaluate to 'true' [-Werror,-Wpointer-bool-conversion] has_thread_id_support(this->thread_id_address && GetThreadIDArg), ~~ ^~~~~~~~~~~~~~ .../llvm-project/libcxxabi/src/cxa_guard.cpp:38:26: note: in instantiation of member function '__cxxabiv1::(anonymous namespace)::InitByteFutex<&__cxxabiv1::(anonymous namespace)::PlatformFutexWait, &__cxxabiv1::(anonymous namespace)::PlatformFutexWake, &__cxxabiv1::(anonymous namespace)::PlatformThreadID>::InitByteFutex' requested here SelectedImplementation imp(raw_guard_object); ^ .../llvm-project/libcxxabi/src/cxa_guard_impl.h:416:54: note: prefix with the address-of operator to silence this warning has_thread_id_support(this->thread_id_address && GetThreadIDArg), ^ & 1 error generated. The diagnostic is incorrect: adding the address-of operator also fails ("cannot take the address of an rvalue of type 'uint32_t (*)()' (aka 'unsigned int (*)()')").
* Revert "[MachineCopyPropagation] Extend MCP to do trivial copy backward ↵Kai Luo2019-12-0511-273/+72
| | | | | | | propagation" This reverts commit 75b3a1c318ccad0f96c38689279bc5db63e2ad05, since it breaks bootstrap build.
* Add a default copy-assignment or copy-constructor for -Wdeprecated-copy ↵Eric Christopher2019-12-042-0/+4
| | | | warnings.
* [AArch64][SVE] Add intrinsics and patterns for logical predicate instructionsDanilo Carvalho Grael2019-12-046-35/+647
| | | | | | | Add instrinics and patters for the following logical predicate instructions: -- and, ands, bic, bics, eor, eors -- sel -- orr, orrs, orn, orns, nor, nors, nand, nads
* [Signal] Allow one-shot SIGPIPE handler to be reachedVedant Kumar2019-12-041-5/+5
| | | | | | | As SIGPIPE is no longer in the IntSigs array, handle SIGPIPE before handling any interrupt signals. Thanks to Alexandre Ganea for pointing out the issue here.
* [fix][unittests][llvm] Fix running unit tests without assertions. [NFCI]Francesco Petrogalli2019-12-051-0/+2
|
* [clangd] Add xref for macro to static index.Utkarsh Saxena2019-12-053-49/+148
| | | | | | | | | | | | | | Summary: This adds the references for macros to the SymbolCollector (used for static index). Enabled if `CollectMacro` option is set. Reviewers: hokein Subscribers: ilya-biryukov, MaskRay, jkorous, arphaman, kadircet, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D70489
* [MachineCopyPropagation] Extend MCP to do trivial copy backward propagationKai Luo2019-12-0511-72/+273
| | | | | | | | | | | | | | | | | | Summary: This patch mainly do such transformation ``` $R0 = OP ... ... // No read/clobber of $R0 and $R1 $R1 = COPY $R0 // $R0 is killed ``` Replace $R0 with $R1 and remove the COPY, we have ``` $R1 = OP ... ``` This transformation can also expose more opportunities for existing copy elimination in MCP. Differential Revision: https://reviews.llvm.org/D67794
* Properly convert all declaration non-type template arguments whenRichard Smith2019-12-043-92/+100
| | | | forming non-type template parameter values.
* [c++17] Fix assert / wrong code when passing a noexcept pointer toRichard Smith2019-12-042-4/+19
| | | | | member function to a non-noexcept pointer to member non-type template parameter.
* [lldb/Reproducers] Don't instrument SBFileSpec::GetPathJonas Devlieghere2019-12-041-1/+1
| | | | | This method uses a char* and length as output arguments and the reproducer instrumentation doesn't know how to deal with that (yet).
* [lldb/Reproducers] Add missing instrumentation for SBFile (2/2)Jonas Devlieghere2019-12-041-3/+3
| | | | Found another issue while running TestDefaultConstructorForAPIObjects.
* [X86] Remove override of shouldUseStrictFP_TO_INT for fp80. NFCCraig Topper2019-12-042-9/+0
| | | | | | | | | | I suspect this became unnecessary after r354161. Prior to that we may have been going through the default expansion of FP_TO_UINT on 64-bit targets and then ending up back in Custom X86 handling to handle the FP_TO_SINT for it. Now we just Custom handle the FP_TO_UINT directly. We already need to handle it for 32-bit mode during type legalization so we wouldn't save any code by using the default expansion on 64-bit.
* Clear out the python class name in OptionParsingStarted for the ↵Jim Ingham2019-12-042-2/+19
| | | | | | | | OptionGroupPythonClassWithDict options class. This value was hanging around so for instance if you made a scripted breakpoint resolver, then went to set another breakpoint, it would still think you had passed in a class name and the breakpoint wouldn't do what you expected.
* [lldb/Reproducers] Add missing instrumentation for SBFileJonas Devlieghere2019-12-042-16/+19
| | | | | This was properly captured by the instrumentation framework when running TestRunCommandInterpreterAPI.py in capture-mode.
* Reland [AArch64][MachineOutliner] Return address signing for outlined functionsDavid Tellenbach2019-12-0512-8/+1275
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Reland after fixing an ASan failure by stopping outlining early if the constraints for return address signing removed too many outlining candidates. During AArch64 frame lowering instructions to enable return address signing are inserted into functions if needed. Functions generated during machine outlining don't run through target frame lowering and hence are missing such instructions. This patch introduces the following changes: 1. If not all functions that potentially participate in function outlining agree on their return address signing scope and their return address signing key, outlining is disabled for these functions. 2. If not all functions that potentially participate in function outlining agree on their support for v8.3A features, outlining is disabled for these functions. 3. If an outlining candidate would outline instructions that modify sp in a way that invalidates return address signing, outlining is disabled for that particular candidate. 4. If all candidate functions agree on the signing scope, signing key and their support for v8.3 features, the outlined function behaves as if it had the same scope and key attributes and as if it would provide the same v8.3A support as the original functions. Reviewers: ostannard, paquette Reviewed By: ostannard Subscribers: kristof.beyls, hiraditya, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D70635
* [GlobalISel] Fix compiler crash lowering G_LOAD in AArch64.Amara Emerson2019-12-042-1/+23
| | | | | | Patch by Daniel Rodríguez Troitiño. Differential Revision: https://reviews.llvm.org/D70794
* [clang][IFS] Ignoring -Xlinker/-Xclang arguments in InterfaceStubs pass for now.Puyan Lotfi2019-12-042-0/+5
| | | | | | | | | | | Many of the inputs to clang driver toolchain tools can be things other than files such as -Xclang and -Xlinker arguments. For now we don't take such tool pass-through type arguments (although having an -Xifs would be nice to have to replace things like -emit-merged-ifs). So because for the moment we are not doing any sort of argument pass-through, I am going to have InterfaceStubs Merger ignore any non-file type input arguments. Differential Revision: https://reviews.llvm.org/D70838
* gn build: Merge 27f12444575LLVM GN Syncbot2019-12-051-0/+1
|
* [clangd] Add a tweak refactoring to wrap Objective-C string literals in ↵Alex Lorenz2019-12-043-0/+105
| | | | | | | | `NSLocalizedString` macros The commit adds a refactoring to Clangd that mimics the existing refactoring action in Xcode that wraps around an Objective-C string literal in an NSLocalizedString macro. Differential Revision: https://reviews.llvm.org/D69543
* [clangd] NFC, add getLangOpts helper to ParsedASTAlex Lorenz2019-12-0413-39/+35
| | | | | The addition of the helper is split out from https://reviews.llvm.org/D69543 as suggested by Kadir. I also updated the existing uses to use the new API.
* [lldb/Reproducers] Propagate LLDB_CAPTURE_REPRODUCER to the test suiteJonas Devlieghere2019-12-043-2/+14
|
* [lldb/Reproducers] Override capture with LLDB_CAPTURE_REPRODUCER env varJonas Devlieghere2019-12-043-0/+31
| | | | | | | | | | | | | | | | | | | | Make it possible to override reproducer capture with the LLDB_CAPTURE_REPRODUCER environment variable. The goal of this change is twofold. (1) I want to be able to enable capturing reproducers during regular test runs, both locally and on the bots. To do so I need a way to force capture. I cannot do this through the Python API, because reproducer capture must be enabled *before* the debugger initialized, which happens automatically when doing `import lldb`. (2) I want to provide an escape hatch for when reproducers are enabled by default. Downstream we have reproducer capture enabled by default in the driver. This patch solves both problems by overriding the reproducer mode based on the environment variable. Acceptable values are 0/1 and ON/OFF.
* Revert "Reland [AArch64][MachineOutliner] Return address signing for ↵Sterling Augustine2019-12-0412-1271/+8
| | | | | | | | | outlined functions" This reverts commit 02760b750b2ffcc0e2f5d78ecb137c80930c42c3. The original commit is not asan clean. http://lab.llvm.org:8011/builders/sanitizer-x86_64-linux-fast/builds/37147/steps/check-llvm%20asan/logs/stdio
OpenPOWER on IntegriCloud