summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* [AMDGPU][MC] Corrected parsing of registersDmitry Preobrazhensky2019-09-272-144/+217
| | | | | | | | | | | | | Summary of changes: refactored code for better readability and future improvements; fixed bug 41281: https://bugs.llvm.org/show_bug.cgi?id=41281 Reviewers: artem.tamazov, arsenm Differential Revision: https://reviews.llvm.org/D65224 llvm-svn: 373094
* [libTooling] Transformer: refine `SourceLocation` specified as anchor of ↵Yitzhak Mandelbaum2019-09-273-12/+78
| | | | | | | | | | | | | | | | | | | | | | | changes. Summary: Every change triggered by a rewrite rule is anchored at a particular location in the source code. This patch refines how that location is chosen and defines it as an explicit function so it can be shared by other Transformer implementations. This patch was inspired by a bug found by a clang tidy, wherein two changes were anchored at the same location (the expansion loc of the macro) resulting in the discarding of the second change. Reviewers: gribozavr Subscribers: cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D66652 llvm-svn: 373093
* [libc++] Take 2: Implement LWG 3158Louis Dionne2019-09-275-17/+65
| | | | | | | | | | | | | | | | | | | | | Summary: LWG 3158 marks the allocator_arg_t constructor of std::tuple as conditionnally explicit based on whether the default constructors of the tuple's members are explicitly default constructible. This was previously committed as r372778 and reverted in r372832 due to the commit breaking LLVM's build in C++14 mode. This issue has now been addressed. Reviewers: mclow.lists Subscribers: christof, jkorous, dexonsmith, libcxx-commits Tags: #libc Differential Revision: https://reviews.llvm.org/D65232 llvm-svn: 373092
* remove File::SetStream(), make new files instead.Lawrence D'Anna2019-09-2728-255/+210
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This patch removes File::SetStream() and File::SetDescriptor(), and replaces most direct uses of File with pointers to File. Instead of calling SetStream() on a file, we make a new file and replace it. My ultimate goal here is to introduce a new API class SBFile, which has full support for python io.IOStream file objects. These can redirect read() and write() to python code, so lldb::Files will need a way to dispatch those methods. Additionally it will need some form of sharing and assigning files, as a SBFile will be passed in and assigned to the main IO streams of the debugger. In my prototype patch queue, I make File itself copyable and add a secondary class FileOps to manage the sharing and dispatch. In that case SBFile was a unique_ptr<File>. (here: https://github.com/smoofra/llvm-project/tree/files) However in review, Pavel Labath suggested that it be shared_ptr instead. (here: https://reviews.llvm.org/D67793) In order for SBFile to use shared_ptr<File>, everything else should as well. If this patch is accepted, I will make SBFile use a shared_ptr I will remove FileOps from future patches and use subclasses of File instead. Reviewers: JDevlieghere, jasonmolenda, zturner, jingham, labath Reviewed By: labath Subscribers: lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D67891 llvm-svn: 373090
* [DebugInfo] Exclude memory location values as parameter entry valuesDjordje Todorovic2019-09-273-18/+7
| | | | | | | | | | | | | | | Abandon describing of loaded values due to safety concerns. Loaded values are described as derefed memory location at caller point. At callee we can unintentionally change that memory location which would lead to different entry being printed value before and after the memory location clobbering. This problem is described in llvm.org/PR43343. Patch by Nikola Prica Differential Revision: https://reviews.llvm.org/D67717 llvm-svn: 373089
* [OpenCL] Pass LangOptions as const refSven van Haastregt2019-09-271-3/+3
| | | | llvm-svn: 373088
* [llvm-exegesis] Fix r373083: Module -> Mod.Clement Courbet2019-09-271-6/+6
| | | | | | | SnippetRepetitorTest.cpp:66:27: error: declaration of ‘std::unique_ptr<llvm::Module> llvm::exegesis::{anonymous}::X86SnippetRepetitorTest::Module’ [-fpermissive] std::unique_ptr<Module> Module; llvm-svn: 373087
* gn build: (manually) merge r373082Nico Weber2019-09-274-71/+33
| | | | llvm-svn: 373086
* gn build: Merge r373083GN Sync Bot2019-09-272-0/+2
| | | | llvm-svn: 373085
* [CodeGenPrepare] Mend "avoid crashing from replacing a phi twice" fix.Jesper Antonsson2019-09-272-1/+69
| | | | | | | | | | | | | | | | | | | Summary: An erroneously negated if-statement by an earlier (March 2019) bugfix left phi replacement/simplification under optimizeMemoryInst() in CodeGenPrepare largely inactivated. The error was found when csmith found that the same assert as in the original bug report could still be triggered in a different way. This patch fixes the bugfix. The original bug was: https://bugs.llvm.org/show_bug.cgi?id=41052 ... and the previous fix was D59358. Reviewers: aprantl, skatkov Reviewed By: skatkov Subscribers: hiraditya, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D67838 llvm-svn: 373084
* [llvm-exegesis] Add loop mode for repeating the snippet.Clement Courbet2019-09-2730-102/+523
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Before this change the Executable function was made by duplicating the snippet. This change adds a --repetion-mode={loop|duplicate} flag that allows choosing between this behaviour and wrapping the snippet instructions in a loop. The new mode can help measurements when the snippet fits in the DSB by short-cirtcuiting decoding. The loop adds a dec + jmp to the measurements, but since these are not part of the critical path, they execute in parallel with the measured code and do not impact measurements in practice. Overview of the change: - New SnippetRepetitor abstraction that handles repeating the snippet. The assembler delegates repeating the instructions to this class. - ExegesisTarget learns how to decrement loop counter and jump. - Some refactoring of the assembler into FunctionFiller/BasicBlockFiller. Reviewers: gchatelet Subscribers: mgorny, tschuett, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D68125 llvm-svn: 373083
* clang-tidy: Don't repeat list of all checks in three places.Nico Weber2019-09-276-102/+43
| | | | | | | | | | | | Instead, put all checks in a cmake variable and reference this. Also, make clangd use the the ClangTidyForceLinker.h header instead of duplicating the list of modules -- the duplicate copy was missing the new "darwin" checker added in r373065. Differential Revision: https://reviews.llvm.org/D68132 llvm-svn: 373082
* [Alignment][NFC] Remove unneeded llvm:: scoping on Align typesGuillaume Chatelet2019-09-2794-453/+434
| | | | llvm-svn: 373081
* [clangd] Remove an unrelated comment, NFC.Haojian Wu2019-09-271-1/+0
| | | | llvm-svn: 373079
* [clang] [AST] Treat "inline gnu_inline" the same way as "extern inline ↵Martin Storsjo2019-09-278-9/+31
| | | | | | | | | | | | | | | | | gnu_inline" in C++ mode This matches how GCC handles it, see e.g. https://gcc.godbolt.org/z/HPplnl. GCC documents the gnu_inline attribute with "In C++, this attribute does not depend on extern in any way, but it still requires the inline keyword to enable its special behavior." The previous behaviour of gnu_inline in C++, without the extern keyword, can be traced back to the original commit that added support for gnu_inline, SVN r69045. Differential Revision: https://reviews.llvm.org/D67414 llvm-svn: 373078
* [LLD] Simplify the demangleItanium function. NFC.Martin Storsjo2019-09-275-17/+9
| | | | | | | | | Instead of returning an optional, just return the input string if demangling fails, as that's what all callers use anyway. Differential Revision: https://reviews.llvm.org/D68015 llvm-svn: 373077
* [LLD] Convert demangleItanium to use the higher level llvm::demangle ↵Martin Storsjo2019-09-272-6/+9
| | | | | | | | | | | | | function. NFC. This avoids a few lines of boilerplate of dealing with C string allocations. Add a testcase for a case where demangling shouldn't happen. Differential Revision: https://reviews.llvm.org/D68014 llvm-svn: 373076
* [LLD] [COFF] Use the unified llvm demangle frontend function. NFC.Martin Storsjo2019-09-276-33/+26
| | | | | | | | Add test cases for some cases where we don't want demangling to happen. Differential Revision: https://reviews.llvm.org/D67301 llvm-svn: 373075
* [lldb] Disable testing entry values as memory locationDjordje Todorovic2019-09-271-0/+3
| | | | | | The D67717 excludes such locations for now. llvm-svn: 373074
* [lldb/cmake] add lldbCore -> clangDriver dependencyPavel Labath2019-09-271-0/+1
| | | | | | | | ModuleList.cpp includes clang/Driver/Driver.h. Reflect that in the build system. Not having this can cause build failures if ModuleList.cpp is built before Driver.inc is generated. llvm-svn: 373073
* Unwind: Add a stack scanning mechanism to support win32 unwindingPavel Labath2019-09-2710-12/+176
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Windows unwinding is weird. The unwind rules do not (always) describe the precise layout of the stack, but rather expect the debugger to scan the stack for something which looks like a plausible return address, and the unwind based on that. The reason this works somewhat reliably is because the the unwinder also has access to the frame sizes of the functions on the stack. This allows it (in most cases) to skip function pointers in local variables or function arguments, which could otherwise be mistaken for return addresses. Implementing this kind of unwind mechanism in lldb was a bit challenging because we expect to be able to statically describe (in the UnwindPlan) structure, the layout of the stack for any given instruction. Giving a precise desription of this is not possible, because it requires correlating information from two functions -- the pushed arguments to a function are considered a part of the callers stack frame, and their size needs to be considered when unwinding the caller, but they are only present in the unwind entry of the callee. The callee may end up being in a completely different module, or it may not even be possible to determine it statically (indirect calls). This patch implements this functionality by introducing a couple of new APIs: SymbolFile::GetParameterStackSize - return the amount of stack space taken up by parameters of this function. SymbolFile::GetOwnFrameSize - the size of this function's frame. This excludes the parameters, but includes stuff like local variables and spilled registers. These functions are then used by the unwinder to compute the estimated location of the return address. This address is not always exact, because the stack may contain some additional values -- for instance, if we're getting ready to call a function then the stack will also contain partially set up arguments, but we will not know their size because we haven't called the function yet. For this reason the unwinder will crawl up the stack from the return address position, and look for something that looks like a possible return address. Currently, we assume that something is a valid return address if it ends up pointing to an executable section. All of this logic kicks in when the UnwindPlan sets the value of CFA as "isHeuristicallyDetected", which is also the final new API here. Right now, only SymbolFileBreakpad implements these APIs, but in the future SymbolFilePDB will use them too. Differential Revision: https://reviews.llvm.org/D66638 llvm-svn: 373072
* Disable the empty string check in TestDataFormatterStdStringPavel Labath2019-09-271-1/+2
| | | | | | | This check was failing since it was added in r372837. It should be possible to re-enable it once D68010 lands. llvm-svn: 373071
* Reland "gn build: (manually) merge r373028"Nico Weber2019-09-274-0/+21
| | | | | | This relands r373029, reverted in 373033, because r373028 relanded in r373066. llvm-svn: 373070
* Fix some swig warningsPavel Labath2019-09-275-21/+3
| | | | | | | | | Previously, these were unseen because the wrapper script would swallow them. This fixes the following types of warnings: - methods being declared more than once - swig complained about ignoring operator=, so I just removed it llvm-svn: 373069
* Fixed indentation in a ClangTidy testDmitri Gribenko2019-09-271-1/+1
| | | | llvm-svn: 373068
* [clangd] Handle type template parameters in findExplicitReferencesIlya Biryukov2019-09-272-0/+25
| | | | | | | | | | | | | | Reviewers: kadircet Reviewed By: kadircet Subscribers: MaskRay, jkorous, arphaman, usaxena95, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D68120 llvm-svn: 373067
* Moved -fblocks from an individual test to check_clang_tidy.pyDmitri Gribenko2019-09-272-2/+3
| | | | | | | This way, all tests will benefit from it and will not have to worry about setting up language options properly. llvm-svn: 373066
* [clang-tidy] New check to warn when storing dispatch_once_t in non-static, ↵Dmitri Gribenko2019-09-2713-0/+235
| | | | | | | | | | | | | | | | | | | | | non-global storage. Summary: Creates a new darwin ClangTidy module and adds the darwin-dispatch-once-nonstatic check that warns about dispatch_once_t variables not in static or global storage. This catches a missing static for local variables in e.g. singleton initialization behavior, and also warns on storing dispatch_once_t values in Objective-C instance variables. C/C++ struct/class instances may potentially live in static/global storage, and are ignored for this check. The osx.API static analysis checker can find the non-static storage use of dispatch_once_t; I thought it useful to also catch this issue in clang-tidy when possible. This is a re-land of https://reviews.llvm.org/D67567 Reviewers: thakis, gribozavr, stephanemoore Subscribers: Eugene.Zelenko, mgorny, xazax.hun, jkorous, arphaman, kadircet, usaxena95 Tags: #clang-tools-extra, #clang, #llvm Differential Revision: https://reviews.llvm.org/D68109 llvm-svn: 373065
* [NFC][ARM] Add some tail-predication testsSam Parker2019-09-271-0/+1757
| | | | | | Use different data types for some simple loops. llvm-svn: 373064
* [SLPVectorizer][X86] Regenerate arith-fp testsSimon Pilgrim2019-09-271-0/+40
| | | | llvm-svn: 373063
* [UpdateTestChecks] Fix wildcard support on DOS promptsSimon Pilgrim2019-09-271-3/+3
| | | | | | D64572 / rL365818 changed the way that the file paths were collected, which meant we lost the file pattern expansion necessary when working with DOS command prompt llvm-svn: 373062
* [lldb] [testsuite] Remove redundant MAKE_DSYM := NOJan Kratochvil2019-09-2717-22/+0
| | | | | | | According to a comment by Pavel Labath: https://reviews.llvm.org/D67589#inline-612375 llvm-svn: 373061
* Revert r372893 "[CodeGen] Replace -max-jump-table-size with ↵Hans Wennborg2019-09-279-104/+107
| | | | | | | | | | | | | | | | | | | | | | | | | | | -max-jump-table-targets" This caused severe compile-time regressions, see PR43455. > Modern processors predict the targets of an indirect branch regardless of > the size of any jump table used to glean its target address. Moreover, > branch predictors typically use resources limited by the number of actual > targets that occur at run time. > > This patch changes the semantics of the option `-max-jump-table-size` to limit > the number of different targets instead of the number of entries in a jump > table. Thus, it is now renamed to `-max-jump-table-targets`. > > Before, when `-max-jump-table-size` was specified, it could happen that > cluster jump tables could have targets used repeatedly, but each one was > counted and typically resulted in tables with the same number of entries. > With this patch, when specifying `-max-jump-table-targets`, tables may have > different lengths, since the number of unique targets is counted towards the > limit, but the number of unique targets in tables is the same, but for the > last one containing the balance of targets. > > Differential revision: https://reviews.llvm.org/D60295 llvm-svn: 373060
* Revert r373056: [clang-format] Reference qualifiers in member templates ↵Ilya Biryukov2019-09-272-47/+4
| | | | | | | causing extra indentation Reason: this breaks unit tests. llvm-svn: 373059
* [sancov][NFC] Make filename Regexes "const"Thomas Preud'homme2019-09-271-2/+2
| | | | | | | | | | | | | | | | | | Summary: The const-correctness of match() was fixed in rL372764, which allows such static Regex objects to be marked const. Reviewers: thopre Reviewed By: thopre Subscribers: llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D68091 llvm-svn: 373058
* [clangd] Support OverloadExpr in findExplicitReferencesIlya Biryukov2019-09-272-1/+43
| | | | | | | | | | | | | | Reviewers: kadircet Reviewed By: kadircet Subscribers: MaskRay, jkorous, arphaman, usaxena95, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D68118 llvm-svn: 373057
* [clang-format] Reference qualifiers in member templates causing extra ↵Ilya Biryukov2019-09-272-4/+47
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | indentation The following code ``` struct f { template <class T> void bar() && noexcept {} }; ``` will be formatted to the following with LLVM style, and `AlwaysBreakTemplateDeclarations: Yes` ``` struct f { template <class T> void bar() && noexcept {} }; ``` The indentation of the `void bar()` line is wrong. Patch by Andreas Wass (AndWass)! Differential Revision: https://reviews.llvm.org/D68072 llvm-svn: 373056
* [NFC][InstCombine] Revisit shift-by-signext testsRoman Lebedev2019-09-271-18/+86
| | | | llvm-svn: 373055
* [Alignment][NFC] MaybeAlign in GVNExpressionGuillaume Chatelet2019-09-272-5/+6
| | | | | | | | | | | | | | | | | Summary: This is patch is part of a series to introduce an Alignment type. See this thread for context: http://lists.llvm.org/pipermail/llvm-dev/2019-July/133851.html See this patch for the introduction of the type: https://reviews.llvm.org/D64790 Reviewers: courbet Subscribers: hiraditya, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D67922 llvm-svn: 373054
* [lldb] Print an error message for an empty subcommandRaphael Isemann2019-09-272-3/+4
| | | | llvm-svn: 373053
* [MC][ARM] vscclrm disassembles as vldmiaAlexandros Lamprineas2019-09-273-2/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | Happens only when the mve.fp subtarget feature is enabled: $ llvm-mc -triple thumbv8.1m.main -mattr=+mve.fp,+8msecext -disassemble <<< "0x9f,0xec,0x08,0x0b" .text vldmia pc, {d0, d1, d2, d3} $ llvm-mc -triple thumbv8.1m.main -mattr=+8msecext -disassemble <<< "0x9f,0xec,0x08,0x0b" .text vscclrm {d0, d1, d2, d3, vpr} Assembling returns the correct encoding with or without mve.fp: $ llvm-mc -triple thumbv8.1m.main -mattr=+mve.fp,+8msecext -show-encoding <<< "vscclrm {d0-d3, vpr}" .text vscclrm {d0, d1, d2, d3, vpr} @ encoding: [0x9f,0xec,0x08,0x0b] $ llvm-mc -triple thumbv8.1m.main -mattr=+8msecext -show-encoding <<< "vscclrm {d0-d3, vpr}" .text vscclrm {d0, d1, d2, d3, vpr} @ encoding: [0x9f,0xec,0x08,0x0b] The problem seems to be in the TableGen description of VSCCLRMD. The least significant bit should be set to zero. Differential Revision: https://reviews.llvm.org/D68025 llvm-svn: 373052
* [lldb][NFC] Actually test which method we call in TestCallOverriddenMethodRaphael Isemann2019-09-272-4/+8
| | | | llvm-svn: 373051
* [lldb][NFC] Test CommandObjectMultiword functionalityRaphael Isemann2019-09-271-0/+34
| | | | | | | | A lot of commands are made up of CommandObjectMultiword with subcommands. CommandObjectMultiword actually has some functionality on its own that wasn't tested before. llvm-svn: 373050
* Fix the 'directory' field in DumpCompilationDatabase and add testHans Wennborg2019-09-272-3/+3
| | | | | | | This broke in r371027 due to a missing negation (llvm::sys::fs::current_path returns false on success). llvm-svn: 373049
* [llvm-exegesis] Refactor how forbidden registers are computed.Clement Courbet2019-09-2710-98/+149
| | | | | | | | | | | | | | | | | | | | Summary: Right now latency generation can incorrectly select the scratch register as a dependency-carrying register. - Move the logic for preventing register selection from Uops implementation to common SnippetGenerator class. - Aliasing detection now takes a set of forbidden registers just like random register assignment does. Reviewers: gchatelet Subscribers: tschuett, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D68084 llvm-svn: 373048
* travis: Add LLVM 9 buildJan Vesely2019-09-271-0/+34
| | | | | | Reviewer: tstellar Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu> llvm-svn: 373047
* travis: Switch to Ubuntu 16.04 (xenial)Jan Vesely2019-09-271-58/+9
| | | | | | | | Use native packages up to llvm-6. Reviewer: tstellar Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu> llvm-svn: 373046
* [LoopInfo] Remove duplicates in ExitBlocks to reduce the compile time ofWei Mi2019-09-271-3/+3
| | | | | | | | | | | | | | | | hasDedicatedExits. For the compile time problem described in https://reviews.llvm.org/D67359, turns out the root cause is there are many duplicates in ExitBlocks so the algorithm complexity of hasDedicatedExits gets very high. If we remove the duplicates, the compile time issue is gone. Thanks to Philip Reames for raising a good question and it leads me to find the root cause. Differential Revision: https://reviews.llvm.org/D68107 llvm-svn: 373045
* Revert "[LoopInfo] Limit the iterations to check whether a loop has dedicatedWei Mi2019-09-274-124/+2
| | | | | | | | | | | exits" Get a better approach in https://reviews.llvm.org/D68107 to solve the problem. Revert the initial patch and will commit the new one soon. This reverts commit rL372990. llvm-svn: 373044
* [test] Use %clang_cc1 instead of %clang -cc1Fangrui Song2019-09-279-12/+12
| | | | llvm-svn: 373043
OpenPOWER on IntegriCloud