summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Fix MSVC "not all control paths return a value" warning. NFCI.Simon Pilgrim2019-10-041-0/+2
| | | | llvm-svn: 373730
* Fix MSVC "result of 32-bit shift implicitly converted to 64 bits" warning. NFCI.Simon Pilgrim2019-10-042-2/+2
| | | | llvm-svn: 373729
* Revert [test] Remove locale dependency for mri-utf8.testOwen Reynolds2019-10-041-1/+5
| | | | | | This reverts r373700 (git commit b455ebf921c5c940c2366bec226959e3a4127fee) llvm-svn: 373728
* [DebugInfo] LiveDebugValues: move DBG_VALUE creation into VarLoc classJeremy Morse2019-10-042-108/+277
| | | | | | | | | | | | | | | | | | | | | | Rather than having a mixture of location-state shared between DBG_VALUEs and VarLoc objects in LiveDebugValues, this patch makes VarLoc the master record of variable locations. The refactoring means that the transfer of locations from one place to another is always a performed by an operation on an existing VarLoc, that produces another transferred VarLoc. DBG_VALUEs are only created at the end of LiveDebugValues, once all locations are known. As a plus, there is now only one method where DBG_VALUEs can be created. The test case added covers a circumstance that is now impossible to express in LiveDebugValues: if an already-indirect DBG_VALUE is spilt, previously it would have been restored-from-spill as a direct DBG_VALUE. We now don't lose this information along the way, as VarLocs always refer back to the "original" non-transfer DBG_VALUE, and we can always work out whether a location was "originally" indirect. Differential Revision: https://reviews.llvm.org/D67398 llvm-svn: 373727
* gn build: (manually) merge r373718Nico Weber2019-10-042-0/+17
| | | | llvm-svn: 373726
* [lldb] Get the TargetAPI lock in SBProcess::IsInstrumentationRuntimePresentRaphael Isemann2019-10-041-0/+3
| | | | | | | | | | | | | | | | | | | Summary: We should get the TargetAPI lock here to prevent the process of being destroyed while we are in the function. Thanks Jim for explaining what's going on. Fixes rdar://54424754 Reviewers: jingham Reviewed By: jingham Subscribers: JDevlieghere, lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D67831 llvm-svn: 373725
* [Format] Fix docs after r373439Sam McCall2019-10-041-1/+2
| | | | llvm-svn: 373724
* [lldb] Fix that 'ninja clean' breaks the build by deleting debugserver_vers.cRaphael Isemann2019-10-041-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | Summary: We mark debugserver_vers.c as a generated file in CMake. This means that when we run `ninja clean` we end up deleting that file, but any following `ninja` invocation will fail due to the file missing. The file can't be generated as `ninja` doesn't know it has to rerun CMake to create the file. Turns out that marking the output of configure_file as generated is wrong as explained in this bug report: https://gitlab.kitware.com/cmake/cmake/issues/18032 This patch just removes that property. The only side effect of this seems to be that this file maybe shows up in your IDE when opening our CMake project, but that seems like a small sacrifice. This patch can be quickly tested by running `ninja clean ; ninja lldbDebugserverCommon`. Before this patch the build will fail due to debugserver_vers.c missing. Reviewers: JDevlieghere, labath Reviewed By: labath Subscribers: mgorny, abidh, lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D68376 llvm-svn: 373723
* Revert "[NFC] [FileCheck] Fix init of stack objects in unit tests"Dmitri Gribenko2019-10-041-16/+20
| | | | | | | This reverts commit r373717. It broke the build: http://lab.llvm.org:8011/builders/clang-x86_64-debian-fast/builds/18721. llvm-svn: 373722
* [lldb] Fix -Wreorder-ctor in r373673Sam McCall2019-10-041-13/+12
| | | | llvm-svn: 373721
* [DebugInfo] LiveDebugValues: defer DBG_VALUE creation during analysisJeremy Morse2019-10-042-8/+110
| | | | | | | | | | | | | | | | | | When transfering variable locations from one place to another, LiveDebugValues immediately creates a DBG_VALUE representing that transfer. This causes trouble if the variable location should subsequently be invalidated by a loop back-edge, such as in the added test case: the transfer DBG_VALUE from a now-invalid location is used as proof that the variable location is correct. This is effectively a self-fulfilling prophesy. To avoid this, defer the insertion of transfer DBG_VALUEs until after analysis has completed. Some of those transfers are still sketchy, but we don't propagate them into other blocks now. Differential Revision: https://reviews.llvm.org/D67393 llvm-svn: 373720
* [lldb] Fix typo in r373675Sam McCall2019-10-041-1/+1
| | | | llvm-svn: 373719
* [TableGen] Introduce a generic automaton (DFA) backendJames Molloy2019-10-0410-1/+1181
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This patch introduces -gen-automata, a backend for generating deterministic finite-state automata. DFAs are already generated by the -gen-dfa-packetizer backend. This backend is more generic and will hopefully be used to implement the DFA generation (and determinization) for the packetizer in the future. This backend allows not only generation of a DFA from an NFA (nondeterministic finite-state automaton), it also emits sidetables that allow a path through the DFA under a sequence of inputs to be analyzed, and the equivalent set of all possible NFA transitions extracted. This allows a user to not just answer "can my problem be solved?" but also "what is the solution?". Clearly this analysis is more expensive than just playing a DFA forwards so is opt-in. The DFAPacketizer has this behaviour already but this is a more compact and generic representation. Examples are bundled in unittests/TableGen/Automata.td. Some are trivial, but the BinPacking example is a stripped-down version of the original target problem I set out to solve, where we pack values (actually immediates) into bins (an immediate pool in a VLIW bundle) subject to a set of esoteric constraints. Reviewers: t.p.northover Subscribers: mgorny, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D67968 llvm-svn: 373718
* [NFC] [FileCheck] Fix init of stack objects in unit testsThomas Preud'homme2019-10-041-20/+16
| | | | | | | | | | | | | | | | Summary: Fix initialization style of objects allocated on the stack in unit test to use the "Type Var(init list)" convention. Reviewers: jhenderson, probinson, arichardson, grimar, jdenny Subscribers: llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D68425 llvm-svn: 373717
* AMDGPU/GlobalISel: Fix using wrong addrspace for apertureMatt Arsenault2019-10-042-9/+11
| | | | | | | This was always passing the destination flat address space, when it should be picking between the two valid source options. llvm-svn: 373716
* AMDGPU/GlobalISel: Select G_PTRTOINTMatt Arsenault2019-10-042-0/+102
| | | | llvm-svn: 373715
* AMDGPU/GlobalISel: Support wave32 waterfall loopsMatt Arsenault2019-10-0413-411/+734
| | | | llvm-svn: 373714
* Revert r371732: "lld-link: Fix tests that do not run on macOS after r371729."Martin Storsjo2019-10-041-1/+1
| | | | | | This commit should be reverted along with r371729. llvm-svn: 373713
* [Driver] NFC: Remove duplicate call to getLibGccTypeCullen Rhodes2019-10-041-1/+0
| | | | | | | | Reviewed By: saugustine Differential Revision: https://reviews.llvm.org/D68380 llvm-svn: 373712
* [lldb][modern-type-lookup] No longer import temporary declarations into the ↵Raphael Isemann2019-10-045-107/+135
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | persistent AST Summary: As we figured out in D67803, importing declarations from a temporary ASTContext that were originally from a persistent ASTContext causes a bunch of duplicated declarations where we end up having declarations in the target AST that have no associated ASTImporter that can complete them. I haven't figured out how/if we can solve this in the current way we do things in LLDB, but in the modern-type-lookup this is solvable as we have a saner architecture with the ExternalASTMerger. As we can (hopefully) make modern-type-lookup the default mode in the future, I would say we try fixing this issue here. As we don't use the hack that was reinstated in D67803 during modern-type-lookup, the test case for this is essentially just printing any kind of container in `std::` as we would otherwise run into the issue that required a hack like D67803. What this patch is doing in essence is that instead of importing a declaration from a temporary ASTContext, we instead check if the declaration originally came from a persistent ASTContext (e.g. the debug information) and we directly import from there. The ExternalASTMerger is already connected with ASTImporters to these different sources, so this patch is essentially just two parts: 1. Mark our temporary ASTContext/ImporterSource as temporary when we import from the expression AST. 2. If the ExternalASTMerger sees we import from the expression AST, instead of trying to import these temporary declarations, check if we can instead import from the persistent ASTContext that is already connected. This ensures that all records from the persistent source actually come from the persistent source and are minimally imported in a way that allows them to be completed later on in the target AST. The next step is to run the ASTImporter for these temporary expressions with the MinimalImport mode disabled, but that's a follow up patch. This patch fixes most test failures with modern-type-lookup enabled by default (down to 73 failing tests, which includes the 22 import-std-module tests which need special treatment). Reviewers: shafik, martong Reviewed By: martong Subscribers: aprantl, rnkovacs, christof, abidh, JDevlieghere, lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D68326 llvm-svn: 373711
* [CodeComplete] Ensure object is the same in compareOverloads()Ilya Biryukov2019-10-043-0/+35
| | | | | | | | | | | | | | | | | | Summary: This fixes a regression that led to size() not being available in clangd when completing 'deque().^' and using libc++. Reviewers: sammccall Reviewed By: sammccall Subscribers: jkorous, arphaman, kadircet, usaxena95, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D68335 llvm-svn: 373710
* [clang-format] [PR43338] C# clang format has space issues betweern C# only ↵Paul Hoad2019-10-044-7/+82
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | keywords Summary: When formatting C# there can be issues with a lack of spaces between `using (` , `foreach (` and generic types The C# code ``` public class Foo { Dictionary<string,string> foo; } ``` will be formatted as ``` public class Foo { Dictionary<string, string>foo; ^^^^^ missing a space } ``` This revision also reverts some of {D66662} in order to make this cleaner and resolve an issues seen by @owenpan that the formatting didn't add a space when not in a code block This also transforms C# foreach commands to be seen as tok::kw_for commands (to ensure foreach gets the same Brace Wrapping behavior as for without littering the code with `if(Style.isCSharp())` Reviewers: owenpan, klimek, russellmcc, mitchell-stellar Reviewed By: mitchell-stellar Subscribers: cfe-commits Tags: #clang, #clang-format Differential Revision: https://reviews.llvm.org/D67660 llvm-svn: 373709
* [ELF] Use union-find set and doubly linked list in Call-Chain Clustering ↵Fangrui Song2019-10-041-52/+62
| | | | | | | | | | | | | | | | | (C³) heuristic Before, SecToClusters[*] was used to track the belonged cluster. During a merge (From -> Into), every element of From has to be updated. Use a union-find set to speed up this use case. Also, replace `std::vector<int> Sections;` with a doubly-linked pointers: int Next, Prev; Reviewed By: Bigcheese Differential Revision: https://reviews.llvm.org/D46228 llvm-svn: 373708
* [clang-format] [PR43333] Fix C# breaking before function name when using ↵Paul Hoad2019-10-045-69/+189
| | | | | | | | | | | | | | | | | | | | | | | | | Attributes Summary: This is a fix for https://bugs.llvm.org/show_bug.cgi?id=43333 This comes with 3 main parts - C# attributes cause function names on a new line even when AlwaysBreakAfterReturnType is set to None - Add AlwaysBreakAfterReturnType to None by default in the Microsoft style, - C# unit tests are not using Microsoft style (which we created to define the default C# style to match a vanilla C# project). Reviewers: owenpan, klimek, russellmcc, mitchell-stellar Reviewed By: mitchell-stellar Subscribers: cfe-commits Tags: #clang-tools-extra, #clang, #clang-format Differential Revision: https://reviews.llvm.org/D67629 llvm-svn: 373707
* [X86] Enable inline memcmp() to use AVX512David Zarzycki2019-10-042-2/+21
| | | | llvm-svn: 373706
* [MinGW] Add --reproduce optionRui Ueyama2019-10-043-0/+6
| | | | | | Differential Revision: https://reviews.llvm.org/D68382 llvm-svn: 373705
* Add /reproduce option to lld/COFFRui Ueyama2019-10-043-6/+35
| | | | | | | | | | | This patch adds /reproduce:<path> option to lld/COFF. This is an lld-specific option, so we can name it freely. I chose /reproduce over other names (e.g. /lldlinkrepro) for consistency with other lld ports. Differential Revision: https://reviews.llvm.org/D68381 llvm-svn: 373704
* Revert r371729: lld-link: Make /linkrepro: take a filename, not a directory.Rui Ueyama2019-10-045-16/+13
| | | | | | | | | | This reverts commit r371729 because /linkrepro option also exists in Microsoft link.exe and their linker takes not a filename but a directory name as an argument for /linkrepro. Differential Revision: https://reviews.llvm.org/D68378 llvm-svn: 373703
* [compiler-rt] Remove O1 tests from signal_line.cppVitaly Buka2019-10-041-4/+0
| | | | | | It does not work on arm llvm-svn: 373702
* Revert "[Symbolize] Use the local MSVC C++ demangler instead of relying on ↵Martin Storsjo2019-10-043-4/+45
| | | | | | | | | dbghelp. NFC." This reverts SVN r373698, as it broke sanitizer tests, e.g. in http://lab.llvm.org:8011/builders/sanitizer-windows/builds/52441. llvm-svn: 373701
* [test] Remove locale dependency for mri-utf8.testThomas Preud'homme2019-10-041-5/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: llvm-ar's mri-utf8.test test relies on the en_US.UTF-8 locale to be installed for its last RUN line to work. If not installed, the unicode string gets encoded (interpreted) as ascii which fails since the most significant byte is non zero. This commit changes the call to open to use a binary literal of the UTF-8 encoding for the pound sign instead, thus bypassing the encoding step. Note that the echo to create the <pound sign>.txt file will work regardless of the locale because both the shell and the echo (in case it's not a builtin of the shell concerned) only care about ascii character to operate. Indeed, the mri-utf8.test file (and in particular the pound sign) is encoded in UTF-8 and UTF-8 guarantees only ascii characters can create bytes that can be interpreted as ascii characters (i.e. bytes with the most significant bit null). So the process to break down the filename in the line goes something along: - find an ascii chevron '>' - find beginning of the filename by removing ascii space-like characters - find ascii newline character indicating the end of the redirection (no semicolon ';', closing curly bracket '}' or parenthesis ')' or the like - create a file whose name is made of all the bytes in between beginning and end of filename *without interpretting them* Reviewers: gbreynoo, MaskRay, rupprecht, JamesNagurne, jfb Subscribers: llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D68418 llvm-svn: 373700
* [AMDGPU][SILoadStoreOptimizer] NFC: Refactor codePiotr Sobczak2019-10-041-120/+80
| | | | | | | | | | | | | | | | | | | | | | | Summary: This patch fixes a potential aliasing problem in InstClassEnum, where local values were mixed with machine opcodes. Introducing InstSubclass will keep them separate and help extending InstClassEnum with other instruction types (e.g. MIMG) in the future. This patch also makes getSubRegIdxs() more concise. Reviewers: nhaehnle, arsenm, tstellar Reviewed By: arsenm Subscribers: arsenm, kzhuravl, jvesely, wdng, nhaehnle, yaxunl, dstuttard, tpr, t-tye, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D68384 llvm-svn: 373699
* [Symbolize] Use the local MSVC C++ demangler instead of relying on dbghelp. NFC.Martin Storsjo2019-10-043-45/+4
| | | | | | | | | This allows making a couple llvm-symbolizer tests run in all environments. Differential Revision: https://reviews.llvm.org/D68133 llvm-svn: 373698
* [test] Remove a needless declaration of REQUIRES: target-windowsMartin Storsjo2019-10-041-1/+1
| | | | | | | | | This test only relies on running on a case insensitive file system, the exact target triple of the toolchain shouldn't matter. Differential Revision: https://reviews.llvm.org/D68136 llvm-svn: 373697
* [JITLink] Remove a redundant semicolon, silencing -Wpedantic warnings with ↵Martin Storsjo2019-10-041-1/+1
| | | | | | GCC. NFC. llvm-svn: 373696
* [clang] [cmake] Add distribution install targets for remaining componentsMichal Gorny2019-10-044-9/+46
| | | | | | | | | Add install targets as necessary to install bash-autocomplete, scan-build and scan-view via LLVM_DISTRIBUTION_TARGETS. Differential Revision: https://reviews.llvm.org/D68413 llvm-svn: 373695
* [clang-tools-extra] [cmake] Use add_clang_tool() to install toolsMichal Gorny2019-10-047-19/+5
| | | | | | | | | | | | Replace add_clang_executable() calls with add_clang_tool() that takes care of creating correct, distribution-friendly install target. While at it, remove redundant install calls. This change also causes clang-move and pp-trace to be installed. Differential Revision: https://reviews.llvm.org/D68423 llvm-svn: 373694
* [JITLink] Explicitly destroy bumpptr-allocated blocks to avoid a memory leak.Lang Hames2019-10-042-8/+14
| | | | llvm-svn: 373693
* [JITLink] Fix an unused variable warning.Lang Hames2019-10-041-3/+2
| | | | llvm-svn: 373692
* Make libc++ gdb pretty printer Python 3 compatibleFangrui Song2019-10-042-10/+27
| | | | llvm-svn: 373691
* gn build: Merge r373689GN Sync Bot2019-10-041-1/+1
| | | | llvm-svn: 373690
* [JITLink] Switch from an atom-based model to a "blocks and symbols" model.Lang Hames2019-10-0425-2132/+2417
| | | | | | | | | | | | | | | | | | | | | | | | In the Atom model the symbols, content and relocations of a relocatable object file are represented as a graph of atoms, where each Atom represents a contiguous block of content with a single name (or no name at all if the content is anonymous), and where edges between Atoms represent relocations. If more than one symbol is associated with a contiguous block of content then the content is broken into multiple atoms and layout constraints (represented by edges) are introduced to ensure that the content remains effectively contiguous. These layout constraints must be kept in mind when examining the content associated with a symbol (it may be spread over multiple atoms) or when applying certain relocation types (e.g. MachO subtractors). This patch replaces the Atom model in JITLink with a blocks-and-symbols model. The blocks-and-symbols model represents relocatable object files as bipartite graphs, with one set of nodes representing contiguous content (Blocks) and another representing named or anonymous locations (Symbols) within a Block. Relocations are represented as edges from Blocks to Symbols. This scheme removes layout constraints (simplifying handling of MachO alt-entry symbols, and hopefully ELF sections at some point in the future) and simplifies some relocation logic. llvm-svn: 373689
* [RISCV] Split SP adjustment to reduce the offset of callee saved register ↵Shiva Chen2019-10-046-223/+267
| | | | | | | | | | | | | | | | | | | | spill and restore We would like to split the SP adjustment to reduce the instructions in prologue and epilogue as the following case. In this way, the offset of the callee saved register could fit in a single store. add sp,sp,-2032 sw ra,2028(sp) sw s0,2024(sp) sw s1,2020(sp) sw s3,2012(sp) sw s4,2008(sp) add sp,sp,-64 Differential Revision: https://reviews.llvm.org/D68011 llvm-svn: 373688
* Revert "Explicitly set entry point arch when it's thumb"Antonio Afonso2019-10-043-179/+0
| | | | | | | | Backing out because SymbolFile/Breakpad/symtab.test is failing and it seems to be a legit issue. Will investigate. This reverts commit 72153f95ee4c1b52d2f4f483f0ea4f650ec863be. llvm-svn: 373687
* [Python] Remove unused variableJonas Devlieghere2019-10-041-1/+0
| | | | | | warning: unused variable 'py_func_obj' [-Wunused-variable] PyObject *py_func_obj = m_py_obj; llvm-svn: 373686
* Properly handle instantiation-dependent array bounds.Richard Smith2019-10-0431-156/+237
| | | | | | | | | We previously failed to treat an array with an instantiation-dependent but not value-dependent bound as being an instantiation-dependent type. We now track the array bound expression as part of a constant array type if it's an instantiation-dependent expression. llvm-svn: 373685
* [compiler-rt] Fix signal_line.cpp testVitaly Buka2019-10-041-2/+2
| | | | | | r373682 committed wrong experimental version llvm-svn: 373684
* [dsymutil] Fix stack-use-after-scopeJonas Devlieghere2019-10-041-2/+2
| | | | | | | | | | The lambda is taking the stack-allocated Verify boolean by reference and it would go out of scope on the next iteration. Moving it out of the loop should fix the issue. Fixes https://bugs.llvm.org/show_bug.cgi?id=43549 llvm-svn: 373683
* [compiler-rt] Remove O2, O3 from signal_line test for fix android testsVitaly Buka2019-10-041-11/+2
| | | | llvm-svn: 373682
* compiler-rt: use __GLIBC_PREREQ for SANITIZER_INTERCEPT_GETRANDOMVitaly Buka2019-10-041-2/+2
| | | | | | | | | | | | | | Summary: Fixes https://github.com/google/oss-fuzz/issues/2836 Reviewers: eugenis Subscribers: dberris, #sanitizers, llvm-commits Tags: #sanitizers, #llvm Differential Revision: https://reviews.llvm.org/D68178 llvm-svn: 373681
OpenPOWER on IntegriCloud