summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* gn build: Merge r369918Nico Weber2019-08-262-0/+2
| | | | llvm-svn: 369953
* Recommit [PowerPC] Update P9 vector costs for insert/extractRoland Froese2019-08-262-24/+53
| | | | | | | Now that the v1i128 smin regression has been fixed, recommit the P9 cost updates from D60160. llvm-svn: 369952
* gn build: color linker errors when using lldNico Weber2019-08-261-0/+3
| | | | llvm-svn: 369951
* gn build: (manually) merge r369741Nico Weber2019-08-261-0/+2
| | | | llvm-svn: 369950
* [InstCombine] icmp eq/ne (gep inbounds P, Idx..), null -> icmp eq/ne P, null ↵Philip Reames2019-08-262-8/+11
| | | | | | | | | | for vectors Extend the transform introduced in https://reviews.llvm.org/D66608 to work for vector geps as well. Differential Revision: https://reviews.llvm.org/D66671 llvm-svn: 369949
* gn build: (manually) merge r369940Nico Weber2019-08-262-0/+8
| | | | llvm-svn: 369948
* [Hexagon] Improve generated code for test-if-bit-clearKrzysztof Parzyszek2019-08-263-22/+35
| | | | llvm-svn: 369947
* [OPENMP][NVPTX]Fix critical region codegen.Alexey Bataev2019-08-262-3/+26
| | | | | | | | | | | | | | | | | Summary: Previously critical regions were emitted with the barrier making it a worksharing construct though it is not. Also, it leads to incorrect behavior in Cuda9+. Patch fixes this problem. Reviewers: ABataev, jdoerfert Subscribers: jholewinski, guansong, cfe-commits, grokos Tags: #clang Differential Revision: https://reviews.llvm.org/D66673 llvm-svn: 369946
* [Attributor] Adjust and test the iteration bound of testsJohannes Doerfert2019-08-2616-16/+28
| | | | | | | | | | | | | | | | | | Summary: Try to verify how many iterations we need for a fixpoint in our tests. This patch adjust the way we count to make it easier to follow. It also adjusts the bounds to actually account for a fixpoint and not only the minimum number to pass all checks. Reviewers: uenoku, sstefan1 Subscribers: hiraditya, bollu, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D66757 llvm-svn: 369945
* [msvc] Add necessary #include to make compiler intrinsics available.Richard Smith2019-08-261-0/+4
| | | | llvm-svn: 369944
* FileManager: Use llvm::Expected in new getFileRef APIDuncan P. N. Exon Smith2019-08-266-28/+50
| | | | | | | | | | | | | | | | | | | | | `FileManager::getFileRef` is a modern API which we expect to convert to over time. We should modernize the error handling as well, using `llvm::Expected` instead of `llvm::ErrorOr`, to help clients that care about errors to ensure nothing is missed. However, not all clients care. I've also added another path for those that don't: - `FileEntryRef` is now copy- and move-assignable (using a pointer instead of a reference). - `FileManager::getOptionalFileRef` returns an `llvm::Optional` instead of `llvm::Expected`. - Added an `llvm::expectedToOptional` utility in case this is useful elsewhere. https://reviews.llvm.org/D66705 llvm-svn: 369943
* [X86] Add a hack to combinePMULDQ to manually turn ↵Craig Topper2019-08-263-13/+38
| | | | | | | | | | | | SIGN_EXTEND_VECTOR_INREG/ZERO_EXTEND_VECTOR_INREG inputs into an ANY_EXTEND_VECTOR_INREG style shuffle ANY_EXTEND_VECTOR_INREG isn't currently marked Legal which prevents SimplifyDemandedBits from turning SIGN/ZERO_EXTEND_VECTOR_INREG into it after op legalization. And even if we did make it Legal, combineExtInVec doesn't do shuffle combining on the VECTOR_INREG nodes until AVX1. This patch adds a quick hack to combinePMULDQ to directly emit a vector shuffle corresponding to an ANY_EXTEND_VECTOR_INREG operation. This avoids both of those issues without creating any other regressions on our tests. The xop-ifma.ll change here also showed up when I tried to resurrect D56306 and seemed to be the only improvement that patch creates now. This is a more direct way to get the benefit. Differential Revision: https://reviews.llvm.org/D66436 llvm-svn: 369942
* Fix file header.Richard Smith2019-08-261-1/+1
| | | | llvm-svn: 369941
* Improve behavior in the case of stack exhaustion.Richard Smith2019-08-2621-123/+348
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Clang performs various recursive operations (such as template instantiation), and may use non-trivial amounts of stack space in each recursive step (for instance, due to recursive AST walks). While we try to keep the stack space used by such steps to a minimum and we have explicit limits on the number of such steps we perform, it's impractical to guarantee that we won't blow out the stack on deeply recursive template instantiations on complex ASTs, even with only a moderately high instantiation depth limit. The user experience in these cases is generally terrible: we crash with no hint of what went wrong. Under this patch, we attempt to do better: * Detect when the stack is nearly exhausted, and produce a warning with a nice template instantiation backtrace, telling the user that we might run slowly or crash. * For cases where we're forced to trigger recursive template instantiation in arbitrarily-deeply-nested contexts, check whether we're nearly out of stack space and allocate a new stack (by spawning a new thread) after producing the warning. Reviewers: rnk, aaron.ballman Subscribers: mgorny, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D66361 llvm-svn: 369940
* [lldb][NFC] Remove dead code that handles situations where LLDB has no dummy ↵Raphael Isemann2019-08-269-377/+226
| | | | | | | | | | | | | | | | | | | | | | target Summary: We always have a dummy target, so any error handling regarding a missing dummy target is dead code now. Also makes the CommandObject methods that return Target& to express this fact in the API. This patch just for the CommandObject part of LLDB. I'll migrate the rest of LLDB in a follow-up patch that's WIP. Reviewers: labath Reviewed By: labath Subscribers: abidh, lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D66737 llvm-svn: 369939
* [driver] add a new option `-gen-cdb-fragment-path` to emitAlex Lorenz2019-08-264-4/+89
| | | | | | | | | | | | | | a fragment of a compilation database for each compilation This patch adds a new option called -gen-cdb-fragment-path to the driver, which can be used to specify a directory path to which clang can emit a fragment of a CDB for each compilation it needs to invoke. This option emits the same CDB contents as -MJ, and will be ignored if -MJ is specified. Differential Revision: https://reviews.llvm.org/D66555 llvm-svn: 369938
* [DAGCombiner][X86] Teach SimplifyVBinOp to fold VBinOp (concat X, ↵Craig Topper2019-08-262-63/+40
| | | | | | | | | | undef/constant), (concat Y, undef/constant) -> concat (VBinOp X, Y), VecC This improves the combine I included in D66504 to handle constants in the upper operands of the concat. If we can constant fold them away we can pull the concat after the bin op. This helps with chains of madd reductions on X86 from loop unrolling. The loop madd reduction pattern creates pmaddwd with half the width of the add that follows it using zeroes to fill the upper bits. If we have two of these added together we can pull the zeroes through the accumulating add and then shrink it. Differential Revision: https://reviews.llvm.org/D66680 llvm-svn: 369937
* [Attributor] Further cut down on non-determinismJohannes Doerfert2019-08-262-4/+5
| | | | llvm-svn: 369936
* [Attributor] Allow explicit dependence trackingJohannes Doerfert2019-08-263-18/+68
| | | | | | | | | | | | | | | By default, the Attributor tracks potential dependences between abstract attributes based on the issued Attributor::getAAFor queries. This simplifies the development of new abstract attributes but it can also lead to spurious dependences that might increase compile time and make internalization harder (D63312). With this patch, abstract attributes can opt-out of implicit dependence tracking and instead register dependences explicitly. It is up to the implementation to make sure all existing dependences are registered. Differential Revision: https://reviews.llvm.org/D63314 llvm-svn: 369935
* [clangd] Release notesSam McCall2019-08-261-1/+92
| | | | llvm-svn: 369934
* [OPENMP][NVPTX]Add __kmpc_syncwarp(int32_t) function.Alexey Bataev2019-08-263-0/+14
| | | | | | | | | | | | | | | | | | | Summary: Added function void __kmpc_syncwarp(int32_t) to expose it to the compiler. It is required to fix the problem with the critical regions in Cuda9.0+. We cannot use barrier in the critical region, but still need to reconverge the threads in the warp after. This function allows to do this. Reviewers: grokos, jdoerfert Subscribers: guansong, openmp-commits, kkwli0, caomhin Tags: #openmp Differential Revision: https://reviews.llvm.org/D66672 llvm-svn: 369933
* Fix use of invalidated iterator introduced by r369680.Richard Smith2019-08-261-4/+4
| | | | llvm-svn: 369932
* [libclang][index][NFCi] Refactor machinery for skipping function bodiesJan Korous2019-08-261-41/+65
| | | | | | | | | | | Refactor machinery for skipping inline function bodies that have already been parsed in other frontend actions. Preparations for moving this code to libIndex. Differential Revision: https://reviews.llvm.org/D66694 llvm-svn: 369931
* TestFunctionStarts.py: add synchronizationFrederic Riss2019-08-262-2/+21
| | | | | | | | | We have started to see the no_binary version of this test fail. The reason is that the binary was being removed before the spawn actually launched the inferior. Add a simple filesystem based synchronization to avoid this race. llvm-svn: 369930
* [asan_symbolize] Attempt to fix build-bot failure after latest changeAlexander Richardson2019-08-261-0/+4
| | | | llvm-svn: 369929
* [NFC] Add comments to some bool arguments for better readabilityGabor Horvath2019-08-261-4/+8
| | | | llvm-svn: 369928
* [DAGCombiner] Remove a bunch of redundant AddToWorklist calls.Amaury Sechet2019-08-261-121/+20
| | | | | | | | | | | | | | | | | Summary: This comes as a first step toward processing the DAG nodes in topological orders. Doing so ensure that arguments of a node are combined before the node itself is combined, which exposes ore opportunities for optimization and/or reduce the amount of patterns a node has to match for. DAGCombiner adding nodes to the worklist is various places causes the nodes to be in a different order from what is expected. In addition, this is reduant because these nodes end up being added to the worklist anyways due to the machinery at line 1621. Reviewers: craig.topper, efriedma, RKSimon, lebedev.ri Subscribers: llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D66537 llvm-svn: 369927
* Fix -dA flag, it is not a preprocessor flag.Erich Keane2019-08-263-6/+3
| | | | | | | | | -dA was in the d_group, which is a preprocessor state dumping group. However -dA is a debug flag to cause a verbose asm. It was already implemented to do the same thing as -fverbose-asm, so make it just be an alias. llvm-svn: 369926
* [clang-doc] Switch Generator::CreateResources to use llvm::ErrorJulie Hockett2019-08-264-28/+44
| | | | | | Differential Revision: https://reviews.llvm.org/D66502 llvm-svn: 369925
* [asan_symbolize] Avoid blocking when llvm-symbolizer is installed as addr2lineAlexander Richardson2019-08-262-5/+38
| | | | | | | | | | | | | | | | | | | | | | Summary: Currently, llvm-symbolizer will print -1 when presented with -1 and not print a second line. In that case we will block for ever trying to read the file name. This also happens for non-existent files, in which case GNU addr2line exits immediate, but llvm-symbolizer does not (see https://llvm.org/PR42754). While touching these lines, I also added some more debug logging to help diagnose this and potential future issues. Reviewers: kcc, eugenis, glider, samsonov Reviewed By: eugenis Subscribers: kubamracek, #sanitizers, llvm-commits Tags: #sanitizers, #llvm Differential Revision: https://reviews.llvm.org/D65322 llvm-svn: 369924
* [PowerPC] add tests for fma with negated ops; NFCSanjay Patel2019-08-261-7/+37
| | | | llvm-svn: 369923
* [dotest] Print invocation when encountering an error.Jonas Devlieghere2019-08-261-2/+6
| | | | | | | | | | | With this patch dotest.py will print the full invocation whenever it fails to parse its arguments. The dotest invocation is usually build up with different inputs, potentially coming from CMake, lldb-dotest, lit or passed directly. This can make debugging hard, especially on CI, where there might be another layer of indirection. This aims to make that a bit easier. llvm-svn: 369922
* [clangd] Fix docsKadir Cetinkaya2019-08-261-2/+3
| | | | llvm-svn: 369920
* [SampleFDO] Extract the code calling each section reader to readOneSection.Wei Mi2019-08-262-20/+33
| | | | | | | | | | | | This is a followup of https://reviews.llvm.org/D66513. The code calling each section reader should be put into a separate function (readOneSection), so SampleProfileExtBinaryReader can override it. Otherwise, the base class SampleProfileExtBinaryBaseReader will need to be aware of all different kinds of section readers. That is not right. Differential Revision: https://reviews.llvm.org/D66693 llvm-svn: 369919
* Moved GlobList into a separate header fileDmitri Gribenko2019-08-2610-125/+173
| | | | | | | | | | | | | | Summary: It is a separate abstraction that is used in more contexts than just a helper for ClangTidyDiagnosticConsumer. Subscribers: mgorny, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D66747 llvm-svn: 369918
* [clangd] Add docs for configuration knobs in clangdKadir Cetinkaya2019-08-262-0/+40
| | | | | | | | | | | | | | | | Summary: This is a first step in documenting different configuration knobs we have in clangd. Reviewers: sammccall Subscribers: ilya-biryukov, MaskRay, jkorous, arphaman, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D66740 llvm-svn: 369917
* clang-format: [JS] handle `as const`.Martin Probst2019-08-262-0/+7
| | | | | | | | | | | | | | | | | | | | Summary: TypeScript 3.4 supports casting into a const type using `as const`: const x = {x: 1} as const; Previously, clang-format would insert a space after the `const`. With this patch, no space is inserted after the sequence `as const`. Reviewers: krasimir Subscribers: cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D66736 llvm-svn: 369916
* [clang-tidy][NFC] Qualify `makeRule` call in test, for consistency with ↵Yitzhak Mandelbaum2019-08-261-2/+3
| | | | | | | | | | other calls. One call `makeRule` is unqualified (and unintentionally relying on ADL to resolve correctly). This revision qualifies that call for consistency and to drop use of ADL. llvm-svn: 369915
* [clang-tidy] TransformerClangTidyCheck: change choice of location for ↵Yitzhak Mandelbaum2019-08-262-15/+59
| | | | | | | | | | | | | | | | | | | | | | | | | diagnostic message. Summary: This patch changes the location specified to the `ClangTidyCheck::diag()`. Currently, the beginning of the matched range is used. This patch uses the beginning of the first fix's range. This change both simplifies the code and (hopefully) gives a more intuitive result: the reported location aligns with the fix(es) provided, rather than the (arbitrary) range of the rule's match. N.B. this patch will break the line offset numbers in lit tests if the first fix is not at the beginning of the match. Reviewers: gribozavr Subscribers: xazax.hun, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D66676 llvm-svn: 369914
* [clangd] Handling text editor/document lifetimes in vscode extension.Johan Vikstrom2019-08-262-11/+36
| | | | | | | | | | | | | | | | Summary: Just reapplies highlightings for all files when visible text editors change. Could find the correct text editor that should be reapplied but going for a simple implementation instead. Removes the associated highlighting entry from the Colorizer when a text document is closed. Reviewers: hokein, ilya-biryukov Subscribers: MaskRay, jkorous, arphaman, kadircet, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D66735 llvm-svn: 369911
* Really fix the type mismatch error in GDBRemoteCommunicationServerCommonPavel Labath2019-08-261-2/+2
| | | | | | | | My previous attempt in attempt in r369904 actually broke the 32bit build because File::Read expects to take a reference to size_t. Fix the warning by using SIZE_MAX to denote failure instead. llvm-svn: 369910
* [X86] Automatically generate various tests. NFCAmaury Sechet2019-08-2625-235/+1033
| | | | llvm-svn: 369909
* [ProcessWindows] Remove equivalent macrosTatyana Krasnukha2019-08-262-4/+4
| | | | llvm-svn: 369908
* Move ProcessInstanceInfoTest to UtilityPavel Labath2019-08-263-1/+1
| | | | | | The class under test was moved in r355342. This moves the test code too. llvm-svn: 369907
* ProcessInstanceInfo: Fix dumping of invalid user idsPavel Labath2019-08-262-11/+44
| | | | | | | Don't attempt to print invalid user ids. Previously, these would come out as UINT32_MAX, or as an assertion failure. llvm-svn: 369906
* Fix windows build after r369894Pavel Labath2019-08-261-6/+4
| | | | | | | | | | | Constructing a std::vector from a llvm::map_range fails on windows, apparently because std::vector expects the input iterator to have a const operator* (map_range iterator has a non-const one). This avoids the cleverness and unrolls the map-loop manually (which is also slightly shorter). llvm-svn: 369905
* Fix a type mismatch error in GDBRemoteCommunicationServerCommonPavel Labath2019-08-261-1/+1
| | | | | | | GetU64 returns a uint64_t. Don't store it in size_t as that is only 32-bit on 32-bit platforms. llvm-svn: 369904
* Postfix: move more code out of the PDB pluginPavel Labath2019-08-265-77/+97
| | | | | | | | | | | | | | | | Summary: Previously we moved the code which parses a single expression out of the PDB plugin, because that was useful for DWARF expressions in breakpad. However, FPO programs are used in breakpad files too (when unwinding on windows), so this completes the job, and moves the rest of the FPO parser too. Reviewers: amccarth, aleksandr.urakov Subscribers: aprantl, markmentovai, rnk, lldb-commits Differential Revision: https://reviews.llvm.org/D66634 llvm-svn: 369894
* [clangd] Added a colorizer to the vscode extension.Johan Vikstrom2019-08-263-9/+230
| | | | | | | | | | | | | | | | | | | | Summary: Adds the main colorizer component. It colorizes every time clangd sends a publishSemanticHighlighting notification. Every time it colorizes it does a full recolorization (removes all decorations from the editor and applies new ones). The reason for this is that all ranges for the same scope share a TextEditorDecorationType. This is due to TextEditorDecorationTypes being very expensive to create. The prototype used one DecorationType per range but that ran into very big performance problems (it took >100 ms to apply 600 lines of highlightings which froze the editor). This version does not share the problem of being extremly slow, but there is probably potential to optimize it even more. No document/texteditor lifecycle management code in this CL, that will come in the next one. Reviewers: hokein, ilya-biryukov Subscribers: MaskRay, jkorous, arphaman, kadircet, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D66219 llvm-svn: 369893
* Breakpad: Add support for parsing STACK WIN recordsPavel Labath2019-08-263-4/+151
| | | | | | | | | | | | Summary: The fields that aren't useful for us right now are simply ignored. Reviewers: amccarth, markmentovai Subscribers: rnk, lldb-commits Differential Revision: https://reviews.llvm.org/D66633 llvm-svn: 369892
OpenPOWER on IntegriCloud