- Nov 13, 2021
-
-
Quinn Pham authored
[NFC] This patch replaces master and slave with primary and secondary respectively when referring to pseudoterminals/file descriptors. Reviewed By: clayborg, teemperor Differential Revision: https://reviews.llvm.org/D113687
-
Dmitry Vyukov authored
Summary: This reverts commit ac95b8d9. There is a number of bot failures: http://45.33.8.238/mac/38755/step_4.txt https://green.lab.llvm.org/green/view/LLDB/job/lldb-cmake/38135/consoleFull#-148886289949ba4694-19c4-4d7e-bec5-911270d8a58c Reviewers: vitalybuka, melver Subscribers:
-
Simon Pilgrim authored
Add support for v32i8/v64i8 converting shift-by-constant to multiply-by-constant. This helps us avoid the generic vXi8 shift lowering, and a lot of VPBLENDVB ops which can be particularly slow. We also needed to reorder a few shift lowering patterns to prevent regressions, particularly for XOP+AVX2 (Excavator) targets (which can split to fast v16i8 shifts) and AVX512-BWI targets (which prefers to extend to fast v32i16 shifts).
-
Zarko Todorovski authored
Small patch that changes blacklisted_global to blocked_global and a change in comments. Reviewed By: pgousseau Differential Revision: https://reviews.llvm.org/D113692
-
Brian Cain authored
__size was declared as unsigned which was compatible with
-
Joel E. Denny authored
Fixes what's left of https://bugs.llvm.org/show_bug.cgi?id=51781. Reviewed By: jdoerfert, JonChesterfield, tianshilei1992 Differential Revision: https://reviews.llvm.org/D113602
-
Florian Hahn authored
-
- Nov 12, 2021
-
-
Jay Foad authored
The old expansion open-coded a 64-bit addition in a strange way, by adding the high parts *without* carry-in from the low part, and then adding the carry back in later on. Fixing this saves a couple of instructions and makes the code much easier to understand. Differential Revision: https://reviews.llvm.org/D113679
-
Zarko Todorovski authored
Change the error message to use ignorelist, and changed some variable and function names in related code and test. Reviewed By: thakis Differential Revision: https://reviews.llvm.org/D113189
-
Kazu Hirata authored
-
Roman Lebedev authored
-
Nicolas Vasilache authored
Address comments from https://reviews.llvm.org/D113745 which landed as aa373180
-
Justas Janickas authored
Reuses C++ for OpenCL constructor address space test so that it supports optional generic address spaces in version 2021. Differential Revision: https://reviews.llvm.org/D110184
-
Alexey Bataev authored
failures, NFC.
-
Kerry McLaughlin authored
`collectElementTypesForWidening` collects the types of load, store and reduction Phis in a loop. These types are later checked using `isElementTypeLegalForScalableVector` to prevent vectorisation of loops with instruction types that are unsupported. This patch removes i1 from the list of types supported for scalable vectors. This fixes an assert ("Cannot yet scalarize uniform stores") in `setCostBasedWideningDecision` when we have a loop containing a uniform i1 store and a scalable VF, which we cannot create a scatter for. Reviewed By: david-arm Differential Revision: https://reviews.llvm.org/D113680 -
Alexey Bataev authored
Need to fix ther cost estimation for split loads, since we look at the subregs already, no need to permute them, need just to estimate subregister insert, if it is smaller than the real register. Also, using split loads, it might be profitable already to vectorize smaller trees with gathering of the loads. Differential Revision: https://reviews.llvm.org/D107188
-
Simon Pilgrim authored
Currently we only constant fold target shuffles if any of the sources has one use, or it would remove a variable shuffle mask - the aim being to avoid constant pool bloat. This patch proposes we should constant fold by default and only limit this if optsize is enabled - I've added a basic test for this in vector-mul.ll (the pmuludq case is by far the most common), I can add other specific test cases if people need them. This should permit further constant folding, break some instruction dependencies and help reduce shuffle port pressure. Differential Revision: https://reviews.llvm.org/D113748
-
Kadir Cetinkaya authored
-
Dmitry Vyukov authored
This change switches tsan to the new runtime which features: - 2x smaller shadow memory (2x of app memory) - faster fully vectorized race detection - small fixed-size vector clocks (512b) - fast vectorized vector clock operations - unlimited number of alive threads/goroutimes Depends on D112602. Reviewed By: melver Differential Revision: https://reviews.llvm.org/D112603
-
Raphael Isemann authored
When LLDB receives a SIGINT while running the embedded Python REPL it currently just crashes in `ScriptInterpreterPythonImpl::Interrupt` with an error such as the one below: ``` Fatal Python error: PyThreadState_Get: the function must be called with the GIL held, but the GIL is released (the current Python thread state is NULL) ``` The faulty code that causes this error is this part of `ScriptInterpreterPythonImpl::Interrupt`: ``` PyThreadState *state = PyThreadState_GET(); if (!state) state = GetThreadState(); if (state) { long tid = state->thread_id; PyThreadState_Swap(state); int num_threads = PyThreadState_SetAsyncExc(tid, PyExc_KeyboardInterrupt); ``` The obvious fix I tried is to just acquire the GIL before this code is running which fixes the crash but the `KeyboardInterrupt` we want to raise immediately is actually just queued and would only be raised once the next line of input has been parsed (which e.g. won't interrupt Python code that is currently waiting on a timer or IO from what I can see). Also none of the functions we call here is marked as safe to be called from a signal handler from what I can see, so we might still end up crashing here with some bad timing. Python 3.2 introduced `PyErr_SetInterrupt` to solve this and the function takes care of all the details and avoids doing anything that isn't safe to do inside a signal handler. The only thing we need to do is to manually setup our own fake SIGINT handler that behaves the same way as the standalone Python REPL signal handler (which raises a KeyboardInterrupt). From what I understand the old code used to work with Python 2 so I kept the old code around until we officially drop support for Python 2. There is a small gap here with Python 3.0->3.1 where we might still be crashing, but those versions have reached their EOL more than a decade ago so I think we don't need to bother about them. Reviewed By: JDevlieghere Differential Revision: https://reviews.llvm.org/D104886 -
Sanjay Patel authored
and (pcmpgt X, -1), Y --> pandn (vsrai X, BitWidth-1), Y This avoids the -1 constant vector in favor of an arithmetic shift instruction if it exists (the ISA is still not complete after all these years...). We catch this pattern late in combining by matching PCMPGT, so it should not interfere with more general folds. Differential Revision: https://reviews.llvm.org/D113603
-
Jan Svoboda authored
This code will be moved to a separate function in a future patch. Reformatting now to prevent a bunch of clang-format complains on Phabricator.
-
Nicolas Vasilache authored
At this time the 2 flavors of conv are a little too different to allow significant code sharing and other will likely come up. so we go the easy route first by duplicating and adapting. Reviewed By: gysit Differential Revision: https://reviews.llvm.org/D113758
-
Dmitry Vyukov authored
Some bots failed with: unshare failed: 1 https://lab.llvm.org/buildbot/#/builders/70/builds/14101 Look only for the target EINVAL error. Differential Revision: https://reviews.llvm.org/D113759
-
Phoebe Wang authored
-
Kadir Cetinkaya authored
If the main file is a header, mark the marcos defined in its preamble section as code-completion ready. Fixes https://github.com/clangd/clangd/issues/921. Differential Revision: https://reviews.llvm.org/D113555
-
Adrian Kuegel authored
This reverts commit 9b6036de. Breaks two libc++ tests.
-
Adrian Kuegel authored
This reverts commit 55085952. The patch it depends on is reverted.
-
Florian Hahn authored
Suggested in D102267, but I missed this in the committed version.
-
Florian Hahn authored
Add an additional test case for D113578.
-
Dmitry Vyukov authored
Start the background thread only after fork, but not after clone. For fork we did this always and it's known to work (or user code has adopted). But if we do this for the new clone interceptor some code (sandbox2) fails. So model we used to do for years and don't start the background thread after clone. Reviewed By: melver Differential Revision: https://reviews.llvm.org/D113744
-
Nicolas Vasilache authored
[mlir][Linalg] Rewrite DownscaleSizeOneWindowed2DConvolution to use rank-reducing insert/extract slices. This rewriting enables better bufferization and canonicalizations. Differential Revision: https://reviews.llvm.org/D113745
-
Dmitry Vyukov authored
The compiler does not recognize HACKY_CALL as a call (we intentionally hide it from the compiler so that it can compile non-leaf functions as leaf functions). To compensate for that hacky call thunk saves and restores all caller-saved registers. However, it saves only general-purposes registers and does not save XMM registers. This is a latent bug that was masked up until a recent "NFC" commit d736002e ("tsan: move memory access functions to a separate file"), which allowed more inlining and exposed the 10-year bug. Save and restore caller-saved XMM registers (all) as well. Currently the bug manifests as e.g. frexp interceptor messes the return value and the added test fails with: i=8177 y=0.000000 exp=4 Reviewed By: melver Differential Revision: https://reviews.llvm.org/D113742
-
Tomasz Miąsko authored
Add support for demangling Rust v0 symbols to llvm-nm by reusing nonMicrosoftDemangle which supports both Itanium and Rust mangling. Reviewed By: dblaikie, jhenderson Differential Revision: https://reviews.llvm.org/D111937
-
Jan Svoboda authored
-
Jan Svoboda authored
-
Salman Javed authored
Re-apply "Fix lint warning in ClangTidyDiagnosticConsumer.cpp (NFC)" with fixes for the failing ASan tests. This reverts commit 74add1b6.
-
Gabor Marton authored
We no longer need a reference to RangedConstraintManager, we call top level `State->assume` functions. Differential Revision: https://reviews.llvm.org/D113261
-
Gabor Marton authored
D103314 introduced symbol simplification when a new constant constraint is added. Currently, we simplify existing equivalence classes by iterating over all existing members of them and trying to simplify each member symbol with simplifySVal. At the end of such a simplification round we may end up introducing a new constant constraint. Example: ``` if (a + b + c != d) return; if (c + b != 0) return; // Simplification starts here. if (b != 0) return; ``` The `c == 0` constraint is the result of the first simplification iteration. However, we could do another round of simplification to reach the conclusion that `a == d`. Generally, we could do as many new iterations until we reach a fixpoint. We can reach to a fixpoint by recursively calling `State->assume` on the newly simplified symbol. By calling `State->assume` we re-ignite the whole assume machinery (along e.g with adjustment handling). Why should we do this? By reaching a fixpoint in simplification we are capable of discovering infeasible states at the moment of the introduction of the **first** constant constraint. Let's modify the previous example just a bit, and consider what happens without the fixpoint iteration. ``` if (a + b + c != d) return; if (c + b != 0) return; // Adding a new constraint. if (a == d) return; // This brings in a contradiction. if (b != 0) return; clang_analyzer_warnIfReached(); // This produces a warning. // The path is already infeasible... if (c == 0) // ...but we realize that only when we evaluate `c == 0`. return; ``` What happens currently, without the fixpoint iteration? As the inline comments suggest, without the fixpoint iteration we are doomed to realize that we are on an infeasible path only after we are already walking on that. With fixpoint iteration we can detect that before stepping on that. With fixpoint iteration, the `clang_analyzer_warnIfReached` does not warn in the above example b/c during the evaluation of `b == 0` we realize the contradiction. The engine and the checkers do rely on that either `assume(Cond)` or `assume(!Cond)` should be feasible. This is in fact assured by the so called expensive checks (LLVM_ENABLE_EXPENSIVE_CHECKS). The StdLibraryFuncionsChecker is notably one of the checkers that has a very similar assertion. Before this patch, we simply added the simplified symbol to the equivalence class. In this patch, after we have added the simplified symbol, we remove the old (more complex) symbol from the members of the equivalence class (`ClassMembers`). Removing the old symbol is beneficial because during the next iteration of the simplification we don't have to consider again the old symbol. Contrary to how we handle `ClassMembers`, we don't remove the old Sym->Class relation from the `ClassMap`. This is important for two reasons: The constraints of the old symbol can still be found via it's equivalence class that it used to be the member of (1). We can spare one removal and thus one additional tree in the forest of `ClassMap` (2). Performance and complexity: Let us assume that in a State we have N non-trivial equivalence classes and that all constraints and disequality info is related to non-trivial classes. In the worst case, we can simplify only one symbol of one class in each iteration. The number of symbols in one class cannot grow b/c we replace the old symbol with the simplified one. Also, the number of the equivalence classes can decrease only, b/c the algorithm does a merge operation optionally. We need N iterations in this case to reach the fixpoint. Thus, the steps needed to be done in the worst case is proportional to `N*N`. Empirical results (attached) show that there is some hardly noticeable run-time and peak memory discrepancy compared to the baseline. In my opinion, these differences could be the result of measurement error. This worst case scenario can be extended to that cases when we have trivial classes in the constraints and in the disequality map are transforming to such a State where there are only non-trivial classes, b/c the algorithm does merge operations. A merge operation on two trivial classes results in one non-trivial class. Differential Revision: https://reviews.llvm.org/D106823 -
Neubauer, Sebastian authored
Differential Revision: https://reviews.llvm.org/D113672
-