summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* [CMake] Run the lldb-server tests with system debugserver.Jonas Devlieghere2019-09-251-1/+1
| | | | | | | Now that we no longer build debugserver when LLDB_USE_SYSTEM_DEBUGSERVER is set, we have to change the logic for testing lldb-server. llvm-svn: 372900
* [InstCombine] Limit FMul constant folding for fma simplifications.Florian Hahn2019-09-254-22/+112
| | | | | | | | | | | | | | | | | As @reames pointed out post-commit, rL371518 adds additional rounding in some cases, when doing constant folding of the multiplication. This breaks a guarantee llvm.fma makes and must be avoided. This patch reapplies rL371518, but splits off the simplifications not requiring rounding from SimplifFMulInst as SimplifyFMAFMul. Reviewers: spatel, lebedev.ri, reames, scanon Reviewed By: reames Differential Revision: https://reviews.llvm.org/D67434 llvm-svn: 372899
* [CUDA][HIP] Enable kernel function return type deduction.Michael Liao2019-09-255-2/+65
| | | | | | | | | | | | | | | | | Summary: - Even though only `void` is still accepted as the deduced return type, enabling deduction/instantiation on the return type allows more consistent coding. Reviewers: tra, jlebar Subscribers: cfe-commits, yaxunl Tags: #clang Differential Revision: https://reviews.llvm.org/D68031 llvm-svn: 372898
* [AArch64][GlobalISel] Choose CCAssignFns per-argument for tail call loweringJessica Paquette2019-09-254-44/+118
| | | | | | | | | | | | | | | | | | | | | | | | | | When checking for tail call eligibility, we should use the correct CCAssignFn for each argument, rather than just checking if the caller/callee is varargs or not. This is important for tail call lowering with varargs. If we don't check it, then basically any varargs callee with parameters cannot be tail called on Darwin, for one thing. If the parameters are all guaranteed to be in registers, this should be entirely safe. On top of that, not checking for this could potentially make it so that we have the wrong stack offsets when checking for tail call eligibility. Also refactor some of the stuff for CCAssignFnForCall and pull it out into a helper function. Update call-translator-tail-call.ll to show that we can now correctly tail call on Darwin. Also add two extra tail call checks. The first verifies that we still respect the caller's stack size, and the second verifies that we still don't tail call when a varargs function has a memory argument. Differential Revision: https://reviews.llvm.org/D67939 llvm-svn: 372897
* Add a missing default parameter to regex::assign. This is LWG3296; reviewed ↵Marshall Clow2019-09-252-6/+16
| | | | | | as https://reviews.llvm.org/D67944 llvm-svn: 372896
* [lldb] Move swig call from python code to cmakeHaibo Huang2019-09-253-629/+24
| | | | | | | | | | | | | | Summary: Elimiates lots of unused code. Reviewers: labath, mgorny Subscribers: lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D68007 llvm-svn: 372895
* [Docs] Document forwarding arguments with litJonas Devlieghere2019-09-251-0/+8
| | | | | | Explain how to forward arguments to dotest.py from lit. llvm-svn: 372894
* [CodeGen] Replace -max-jump-table-size with -max-jump-table-targetsEvandro Menezes2019-09-259-107/+104
| | | | | | | | | | | | | | | | | | | | | | | 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: 372893
* [LangRef] Clarify absence of rounding guarantees for fmuladd.Florian Hahn2019-09-251-6/+6
| | | | | | | | | | | | | During the review of D67434, it was recommended to make fmuladd's behavior more explicit. D67434 depends on this interpretation. Reviewers: efriedma, jfb, reames, scanon, lebedev.ri, spatel Reviewed By: spatel Differential Revision: https://reviews.llvm.org/D67552 llvm-svn: 372892
* [Dwarf] Make dw_tag_t a typedef for llvm::dwarf::Tag instead of uint16_t.Jonas Devlieghere2019-09-257-11/+13
| | | | | | | | | | | | Currently dw_tag_t is a typedef for uint16_t. This patch changes makes dw_tag_t a typedef for llvm::dwarf::Tag. This enables us to use the full power of the DWARF utilities in LLVM without having to do the cast every time. With this approach, we only have to do the cast when reading the ULEB value. Differential revision: https://reviews.llvm.org/D68005 llvm-svn: 372891
* Modernize Makefile.Adrian Prantl2019-09-251-1/+1
| | | | llvm-svn: 372890
* Re-land r372863: [AST] Extract Decl::printNestedNameSpecifier helper from ↵Ilya Biryukov2019-09-253-20/+85
| | | | | | | | | | Decl::printQualifiedName Reverted in r372880 due to the test failure. Also contains a fix that adjusts printQualifiedName to return the same results as before in case of anonymous function locals and parameters. llvm-svn: 372889
* [clangd] Change constness of parameters to findExplicitRefsKadir Cetinkaya2019-09-252-6/+6
| | | | | | | | | | | | | | | | | | Summary: Recursive AST requires non-const ast nodes, but it doesn't really mutate them. In addition to that, in clangd we mostly have const ast nodes. So it makes sense to move the const_cast into callee rather than having it at every caller in the future. Reviewers: ilya-biryukov Subscribers: MaskRay, jkorous, arphaman, usaxena95, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D68027 llvm-svn: 372888
* fixed test: eliminated race condition which might cause deadlockAndrey Churbanov2019-09-251-1/+1
| | | | llvm-svn: 372887
* [DAGCombiner] add one-use restriction to vector transform with cheap extractSanjay Patel2019-09-252-11/+8
| | | | | | | | | | We might be able to do better on the example in the test, but in general, we should not scalarize a splatted vector binop if there are other uses of the binop. Otherwise, we can end up with code as we had - a scalar op that is redundant with a vector op. llvm-svn: 372886
* [PatternMatch] Make m_Br more flexible, add matchers for BB values.Florian Hahn2019-09-255-19/+84
| | | | | | | | | | | | | | | | | | | | | Currently m_Br only takes references to BasicBlock*, which limits its flexibility. For example, you have to declare a variable, even if you ignore the result or you have to have additional checks to make sure the matched BB matches an expected one. This patch adds m_BasicBlock and m_SpecificBB matchers, which can be used like the existing matchers for constants or values. I also had a look at the existing uses and updated a few. IMO it makes the code a bit more explicit. Reviewers: spatel, craig.topper, RKSimon, majnemer, lebedev.ri Reviewed By: lebedev.ri Differential Revision: https://reviews.llvm.org/D68013 llvm-svn: 372885
* [NFC] Fix typo in `getPreviousDecl` comment.Yitzhak Mandelbaum2019-09-251-1/+1
| | | | llvm-svn: 372884
* [x86] add test for multi-use scalarization of vector binop; NFCSanjay Patel2019-09-251-0/+26
| | | | llvm-svn: 372883
* [TargetInstrInfo] Let findCommutedOpIndices take const MachineInstr&Simon Pilgrim2019-09-2510-10/+15
| | | | | | | | | | Neither the base implementation of findCommutedOpIndices nor any in-tree target modifies the instruction passed in and there is no reason why they would in the future. Committed on behalf of @hvdijk (Harald van Dijk) Differential Revision: https://reviews.llvm.org/D66138 llvm-svn: 372882
* [PatternMatch] Generalize brc_match (NFC).Florian Hahn2019-09-251-5/+8
| | | | | | Preparation for D68013. llvm-svn: 372881
* Revert r372863: [AST] Extract Decl::printNestedNameSpecifier helper from ↵Ilya Biryukov2019-09-253-80/+20
| | | | | | | Decl::printQualifiedName Reason: causes a test failure, will investigate and re-land with a fix. llvm-svn: 372880
* Enable tasks dependencies hashmaps resizing.Andrey Churbanov2019-09-253-11/+103
| | | | | | | | Patch by viroulep (Philippe Virouleau) Differential Revision: https://reviews.llvm.org/D67447 llvm-svn: 372879
* [IR] allow fast-math-flags on phi of FP values (2nd try)Sanjay Patel2019-09-259-13/+85
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The changes here are based on the corresponding diffs for allowing FMF on 'select': D61917 <https://reviews.llvm.org/D61917> As discussed there, we want to have fast-math-flags be a property of an FP value because the alternative (having them on things like fcmp) leads to logical inconsistency such as: https://bugs.llvm.org/show_bug.cgi?id=38086 The earlier patch for select made almost no practical difference because most unoptimized conditional code begins life as a phi (based on what I see in clang). Similarly, I don't expect this patch to do much on its own either because SimplifyCFG promptly drops the flags when converting to select on a minimal example like: https://bugs.llvm.org/show_bug.cgi?id=39535 But once we have this plumbing in place, we should be able to wire up the FMF propagation and start solving cases like that. The change to RecurrenceDescriptor::AddReductionVar() is required to prevent a regression in a LoopVectorize test. We are intersecting the FMF of any FPMathOperator there, so if a phi is not properly annotated, new math instructions may not be either. Once we fix the propagation in SimplifyCFG, it may be safe to remove that hack. Differential Revision: https://reviews.llvm.org/D67564 llvm-svn: 372878
* Fix analyzer TypeAttributeImpl::anchor() override.Simon Pilgrim2019-09-251-1/+1
| | | | | | TypeAttributeImpl inherits from EnumAttributeImpl which already defines anchor() as a virtual, so we should override this instead of redeclaring it. llvm-svn: 372877
* [gn build] Fix Python DeprecationWarningMarco Antognini2019-09-251-4/+10
| | | | | | | | | | | | | | | Summary: This fixes two issues: - DeprecationWarning: invalid escape sequence \` - ResourceWarning: unclosed file Subscribers: mgorny, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D67753 llvm-svn: 372876
* [clangd] Fix parseNamespaceEvents to parse the last tokenKadir Cetinkaya2019-09-252-0/+13
| | | | | | | | | | | | Reviewers: hokein, ilya-biryukov Subscribers: MaskRay, jkorous, arphaman, usaxena95, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D68020 llvm-svn: 372875
* [Dominators][AMDGPU] Don't use virtual exit node in ↵Jakub Kuderski2019-09-254-46/+65
| | | | | | | | | | | | | | | | | | | | | | | findNearestCommonDominator. Cleanup MachinePostDominators. Summary: This patch fixes a bug that originated from passing a virtual exit block (nullptr) to `MachinePostDominatorTee::findNearestCommonDominator` and resulted in assertion failures inside its callee. It also applies a small cleanup to the class. The patch introduces a new function in PDT that given a list of `MachineBasicBlock`s finds their NCD. The new overload of `findNearestCommonDominator` handles virtual root correctly. Note that similar handling of virtual root nodes is not necessary in (forward) `DominatorTree`s, as right now they don't use virtual roots. Reviewers: tstellar, tpr, nhaehnle, arsenm, NutshellySima, grosser, hliao Reviewed By: hliao Subscribers: hliao, kzhuravl, jvesely, wdng, yaxunl, dstuttard, t-tye, hiraditya, llvm-commits Tags: #amdgpu, #llvm Differential Revision: https://reviews.llvm.org/D67974 llvm-svn: 372874
* [SystemZ] Improve emitSelect()Jonas Paulsson2019-09-255-103/+150
| | | | | | | | | | | | | Merge more Select pseudo instructions in emitSelect() by allowing other instructions between them as long as they do not clobber CC. Debug value instructions are now moved down to below the new PHIs instead of erasing them. Review: Ulrich Weigand https://reviews.llvm.org/D67619 llvm-svn: 372873
* Fix cppcheck variable shadow warning. NFCI.Simon Pilgrim2019-09-251-3/+3
| | | | llvm-svn: 372872
* Add missing ExplicitTy default initialization to ConstantExprKeyType ↵Simon Pilgrim2019-09-251-2/+4
| | | | | | | | constructors. Fixes cppcheck uninitialized variable warnings llvm-svn: 372871
* [libTooling] Introduce the MatchConsumer abstractionYitzhak Mandelbaum2019-09-254-20/+62
| | | | | | | | | | | | | | | | | Summary: This revision introduces a separate (small) library for the `MatchConsumer` abstraction: computations over AST match results. This abstraction is central to the Transformer framework, and there deserves being defined explicitly. Reviewers: gribozavr Subscribers: cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D67961 llvm-svn: 372870
* [lldb][modern-type-lookup] Add two basic tests for modern-type-lookupRaphael Isemann2019-09-256-0/+69
| | | | | | | | | | | | | | | | | | The story so far: LLDB's modern type lookup mode has no (as in, 0%) test coverage. It was supposed to be tested by hardcoding the default to 'true' and then running the normal LLDB tests, but to my knowledge no one is doing that. As a around 130 tests seem to fail with this mode enabled, we also can't just enable it globally for now. As we touch the surrounding code all the time and also want to refactor parts of it, we should be a bit more ambitious with our testing efforts. So this patch adds two basic tests that enable this mode and do some basic expression parsing which should hopefully be basic enough to not break anywhere but still lets us know if this mode works at all (i.e. setting up the ExternalASTMerger in LLDB, using its basic import functionality to move declarations around and do some lookups). llvm-svn: 372869
* Revert [IR] allow fast-math-flags on phi of FP valuesSanjay Patel2019-09-2510-86/+14
| | | | | | This reverts r372866 (git commit dec03223a97af0e4dfcb23da55c0f7f8c9b62d00) llvm-svn: 372868
* [llvm-readobj/llvm-readelf] - .stack_sizes: demangle symbol names in ↵George Rimar2019-09-252-42/+48
| | | | | | | | | | | | | | | warnings reported. I started this patch as a refactoring, tried to make a helper for getting symbol names, similar to how we get section names used in warning messages. So this patch cleanups the code and fixes an issue: symbol names in warning messages were not demangled. Differential revision: https://reviews.llvm.org/D68012 llvm-svn: 372867
* [IR] allow fast-math-flags on phi of FP valuesSanjay Patel2019-09-2510-14/+86
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The changes here are based on the corresponding diffs for allowing FMF on 'select': D61917 As discussed there, we want to have fast-math-flags be a property of an FP value because the alternative (having them on things like fcmp) leads to logical inconsistency such as: https://bugs.llvm.org/show_bug.cgi?id=38086 The earlier patch for select made almost no practical difference because most unoptimized conditional code begins life as a phi (based on what I see in clang). Similarly, I don't expect this patch to do much on its own either because SimplifyCFG promptly drops the flags when converting to select on a minimal example like: https://bugs.llvm.org/show_bug.cgi?id=39535 But once we have this plumbing in place, we should be able to wire up the FMF propagation and start solving cases like that. The change to RecurrenceDescriptor::AddReductionVar() is required to prevent a regression in a LoopVectorize test. We are intersecting the FMF of any FPMathOperator there, so if a phi is not properly annotated, new math instructions may not be either. Once we fix the propagation in SimplifyCFG, it may be safe to remove that hack. Differential Revision: https://reviews.llvm.org/D67564 llvm-svn: 372866
* [docs][llvm-strings] Clarify "printable character" wordingJames Henderson2019-09-251-2/+2
| | | | | | | | | | | | | | The --bytes option uses the phrase "printable ASCII characters", but the description section used simply "printable characters". To avoid any confusion about locale impacts etc, this change adopts the former's phrasing in both places. It also fixes a minor grammar issue in the description. Reviewed by: MaskRay Differential Revision: https://reviews.llvm.org/D68016 llvm-svn: 372865
* [docs][llvm-strip] Update llvm-strip doc to better match llvm-objcopy'sJames Henderson2019-09-251-9/+11
| | | | | | | | | Main changes are mostly wording of some options, but this change also fixes a switch reference so that a link is created and moves --strip-sections into the ELF-specific area since it is only supported for ELF currently. llvm-svn: 372864
* [AST] Extract Decl::printNestedNameSpecifier helper from ↵Ilya Biryukov2019-09-253-20/+80
| | | | | | | | | | | | | | | | | | | | | Decl::printQualifiedName Summary: To be used in clangd, e.g. in D66647. Currently the alternative to this function is doing string manipulation on results of `printQualifiedName`, which is hard-to-impossible to get right in presence of template arguments. Reviewers: kadircet, aaron.ballman Reviewed By: kadircet, aaron.ballman Subscribers: aaron.ballman, usaxena95, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D67825 llvm-svn: 372863
* Have ABI plugins vend llvm MCRegisterInfo dataPavel Labath2019-09-2535-76/+230
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: I was recently surprised to learn that there is a total of 2 (two) users of the register info definitions contained in the ABI plugins. Yet, the defitions themselves span nearly 10kLOC. The two users are: - dwarf expression pretty printer - the mechanism for augmenting the register info definitions obtained over gdb-remote protocol (AugmentRegisterInfoViaABI) Both of these uses need the DWARF an EH register numbers, which is information that is already available in LLVM. This patch makes it possible to do so. It adds a GetMCRegisterInfo method to the ABI class, which every class is expected to implement. Normally, it should be sufficient to obtain the definitions from the appropriate llvm::Target object (for which I provide a utility function), but the subclasses are free to construct it in any way they deem fit. We should be able to always get the MCRegisterInfo object from llvm, with one important exception: if the relevant llvm target was disabled at compile time. To handle this, I add a mechanism to disable the compilation of ABI plugins based on the value of LLVM_TARGETS_TO_BUILD cmake setting. This ensures all our existing are able to create their MCRegisterInfo objects. The new MCRegisterInfo api is not used yet, but the intention is to make use of it in follow-up patches. Reviewers: jasonmolenda, aprantl, JDevlieghere, tatyana-krasnukha Subscribers: wuzish, nemanjai, mgorny, kbarton, atanasyan, lldb-commits Differential Revision: https://reviews.llvm.org/D67965 llvm-svn: 372862
* [lldb][NFC] Remove CompletionRequest::GetCursorArgument and ↵Raphael Isemann2019-09-253-11/+4
| | | | | | | | | | GetRawLineUntilCursor They both return the same result as another function (GetCursorArgumentPrefix and GetRawLine). They were only added because the old API allowed to look (in theory) behind the cursor position which is no longer possible. llvm-svn: 372861
* [clangd] Add missing header guard, NFC.Haojian Wu2019-09-252-0/+10
| | | | llvm-svn: 372860
* [clangd] A helper to find explicit references and their namesIlya Biryukov2019-09-253-1/+549
| | | | | | | | | | | | | | | | | | | | | | Summary: Allows to simplify pending code tweaks: - the upcoming DefineInline tweak (D66647) - remove using declaration (D56612) - qualify name under cursor (D56610) Another potential future application is simplifying semantic highlighting. Reviewers: kadircet Reviewed By: kadircet Subscribers: mgrang, jfb, MaskRay, jkorous, arphaman, usaxena95, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D67826 llvm-svn: 372859
* [lldb][NFC] Add CompletionRequest::AppendEmptyArgumentRaphael Isemann2019-09-254-21/+14
| | | | | | | | | This is the only legitimate use we currently have for modifying a CompletionRequest. Add a utility function for this purpose and remove the remaining setters which go against the idea of having an immutable CompletionRequest. llvm-svn: 372858
* [AMDGPU][MC][DOC] Updated AMD GPU assembler description.Dmitry Preobrazhensky2019-09-2558-714/+1063
| | | | | | | | Summary of changes: - Updated to reflect recent changes in assembler; - Minor bugfixing and improvements. llvm-svn: 372857
* [DAG] Pull out minimum shift value calc into a helper function. NFCI.Simon Pilgrim2019-09-251-20/+28
| | | | llvm-svn: 372856
* [llvm-readobj] - Simplify stack-sizes.test test case.George Rimar2019-09-251-10/+20
| | | | | | | | | | This is a follow-up for D67757, which allows to describe .stack_sizes sections with a new YAML syntax. Differential revision: https://reviews.llvm.org/D67759 llvm-svn: 372855
* [yaml2elf] - Support describing .stack_sizes sections using unique suffixes.George Rimar2019-09-254-6/+41
| | | | | | | | | | | | | Currently we can't use unique suffixes in section names to describe stack sizes sections. E.g. '.stack_sizes [1]' will be treated as a regular section. This happens because we recognize stack sizes section by name and do not yet drop the suffix before the check. The patch fixes it. Differential revision: https://reviews.llvm.org/D68018 llvm-svn: 372853
* [LLD] Fix testcase from SVN r372843 if executed on windowsMartin Storsjo2019-09-251-2/+2
| | | | | | | This should fix buildbot errors like this one: http://lab.llvm.org:8011/builders/clang-x64-windows-msvc/builds/10997 llvm-svn: 372852
* [lldb][NFC] Remove useless cursor shifting in Options::HandleOptionCompletionRaphael Isemann2019-09-251-4/+1
| | | | | | | | The cursor position is always at the end of the current argument (as the argument cut off after the cursor position). So this code is a no-op and can be removed. llvm-svn: 372851
* gn build: (manually) merge r372843Nico Weber2019-09-251-0/+1
| | | | llvm-svn: 372850
OpenPOWER on IntegriCloud