- Jan 17, 2023
-
-
Sergey Kachkov authored
This patch extends Def memory dependency with support of select instructions to consistently handle pointer-select conversion. Differential Revision: https://reviews.llvm.org/D141619
-
Kadir Cetinkaya authored
This is causing flakiness, see https://lab.llvm.org/buildbot/#/builders/131/builds/39272
-
Fangrui Song authored
-
Noah Goldstein authored
This is essentially expanding on the optimizations added on: D120199 but applies the optimization to cases where the bit being changed / tested is not am IMM but is a provable power of 2. The only case currently added for cases like: `__atomic_fetch_xor(p, 1 << c, __ATOMIC_RELAXED) & (1 << c)` Which instead of using a `cmpxchg` loop can be done with `btcl; setcc; shl`. There are still a variety of missed cases that could/should be addressed in the future. This commit documents many of those cases with Todos. Reviewed By: pengfei Differential Revision: https://reviews.llvm.org/D140939
-
Noah Goldstein authored
I.e for blsi match (and (sub 0, x), x) but we currently miss valid patterns like (and (and (sub 0, x), y), x). Reviewed By: pengfei Differential Revision: https://reviews.llvm.org/D141178
-
Jonathan Peyton authored
Each time a thread gets a new affinity assigned, it will not only assign its mask, but also topology information including which socket, core, thread and core-attributes (if available) it is now assigned. This occurs for all non-disabled KMP_AFFINITY values as well as OMP_PLACES/OMP_PROC_BIND. The information regarding which socket, core, etc. can take on three values: 1) The actual ID of the unit (0 - (N-1)), given N units 2) UNKNOWN_ID (-1) which indicates it does not know which ID 3) MULTIPLE_ID (-2) which indicates the thread is spread across multiple of this unit (e.g., affinity mask is spread across multiple hardware threads) This new information is stored in th_topology_ids[] array. An example how to get the socket Id, one would read th_topology_ids[KMP_HW_SOCKET]. This could be expanded in the future to something more descriptive for the "multiple" case, like a range of values. For now, the single value suffices. The information regarding the core attributes can take on two values: 1) The actual core-type or core-eff 2) KMP_HW_CORE_TYPE_UNKNOWN if the core type is unknown, and UNKNOWN_CORE_EFF (-1) if the core eff is unknown. This new information is stored in th_topology_attrs. An example how to get the core type, one would read th_topology_attrs.core_type. Differential Revision: https://reviews.llvm.org/D139854 -
Shilei Tian authored
This patch fixes the wrong format string used in `__kmpc_error`, which could cause segment fault at runtime. Reviewed By: jlpeyton Differential Revision: https://reviews.llvm.org/D141889
-
Jonathan Peyton authored
When building the library with icc and using it on macOS 12, the library destruction process is skipped which has many OMPT tests failing for macOS 12. This change registers the __kmp_internal_end_library() call for atexit() which will be a harmless, redundant call for macOS 11 and below and the only destructor called for macOS 12+. Differential Revision: https://reviews.llvm.org/D139857
-
chenglin.bi authored
https://alive2.llvm.org/ce/z/pLhHI9 Fix: https://github.com/llvm/llvm-project/issues/59598 Reviewed By: samtebbs Differential Revision: https://reviews.llvm.org/D141829
-
Chuanqi Xu authored
Closing https://github.com/llvm/llvm-project/issues/56436 We can't support the GNU address of label extension in coroutines well in current architecture. Since the coroutines are going to split into pieces in the middle end so the address of labels are ambiguous that time. To avoid any further misunderstanding, we try to emit an error here. Differential Revision: https://reviews.llvm.org/D131938
-
Shilei Tian authored
This patch fixes the issue that a functor is not captured properly if that is used in a task region. It was introduced by https://reviews.llvm.org/D114546 where `CallExpr` is treated specially, but the callee itself is not properly visited. https://reviews.llvm.org/D115902 already did some fix for one case. This patch fixes another case. Fix #57757. Reviewed By: ABataev Differential Revision: https://reviews.llvm.org/D141873
-
Freddy Ye authored
-
chendewen authored
The REINTERPRET_CAST operation generates redundant and and ptrue instructions. For some instructions, this is redundant, because its inactive lanes are zeroed by construction. For example. Codegen before: ``` facgt p2.d, p0/z, z4.d, z1.d ptrue p1.d and p1.b, p2/z, p2.b, p1.b ``` After: ``` facgt p1.d, p0/z, z4.d, z1.d ``` ref: https://reviews.llvm.org/D129851 Reviewed By:sdesmalen Differential Revision:https://reviews.llvm.org/D141469 -
Arthur Eubanks authored
Or else it unexpectedly passes in non-assert builds of bolt.
-
Arthur Eubanks authored
Reviewed By: asbirlea, nikic Differential Revision: https://reviews.llvm.org/D141443
-
James Y Knight authored
Delete mention of the llvm.eh.begincatch/llvm.eh.endcatch intrinsics, and remove them from a few remaining test-cases. These intrinsics were from a previous attempt at implementing Windows exception-handling, but were removed from LLVM in 2015. Also mention that dynamic exception specifications ("throw filters") were removed from the spec in C++17. -
Paul Walker authored
Just a rerun of update_cc_test_checks.py to capture some changes to variable names after their reliance on instcombine was removed.
-
Luo, Yuanke authored
Since there is no mask instruction for vXi1 with avx512f in X86 target. Folding select for vXi1 doesn't help to reduce instructions. Differential Revision: https://reviews.llvm.org/D141782
-
Mehdi Amini authored
This streamlines the implementation and makes it so that the virtual tables are in the binary instead of dynamically assembled during initialization. The dynamic allocation size of op registration is also smaller with this change. This reverts commit 7bf1e441 and re-introduce e055aad5 after fixing the windows crash by making ParseAssemblyFn a unique_function again Differential Revision: https://reviews.llvm.org/D141492
-
James Y Knight authored
It was only ever used there, already. The previous location seems left-over from when the personality function was specified on a per-landingpad basis, instead of per-function.
-
James Y Knight authored
This was intended to skip past the EH_LABEL which is added at the top of a landingpad block. But, it is unnecessary because `LastLocalValue` is already set to point past the EH_LABEL in that case. Thus, currently, this is dead-code. I am removing it because it _also_ attempts to skip over EH_LABELs emitted around a call. Currently, this situation never arises, but it becomes harmful after a future in-progress commit.
-
Mehdi Amini authored
This reverts commit e055aad5. This crashes on Windows at the moment for some reasons.
-
Martin Storsjö authored
The MinGW compiler driver first tries to deduce the root of the toolchain installation (either clang itself or a separate cross mingw gcc installation). On top of this root, a number of include and lib paths are added (some added unconditionally, some only if they exist): - <base>/x86_64-w64-mingw32/include - <base>/include - <base>/include/x86_64-w64-windows-gnu (Some more are also added for libstdc++ and/or libc++.) The first one is the one commonly used for MinGW targets so far. For LLVM runtimes installed with the LLVM_ENABLE_PER_TARGET_RUNTIME_DIR option, the latter two are used though (this is currently not the default, not yet at least). For cross compiling, if base is a separate dedicated directory, this is fine, but when using the sysroots of a distro-installed cross mingw toolchain, base is /usr - and having /usr/include in the include path for cross compilation is a potential source for problems; see https://github.com/llvm/llvm-project/issues/59871. If not cross compiling though, <base>/include needs to be included too. E.g. in the case of msys2, most headers are in e.g. /mingw64/include while the compiler is /mingw64/bin/clang. When cross compiling, if the sysroot has been explicitly set by the user, keep <base>/include too. (In the case of a distro provided cross gcc toolchain in /usr, the sysroot needs to be set to /usr and not /usr/x86_64-w64-mingw32 though, to be able to find libgcc files under /usr/lib/gcc/x86_64-w64-mingw32. So with such a toolchain, setting the sysroot explicitly does retain the problem.) All in all - this avoids adding /usr/include and /usr/lib to the include/lib paths when doing mingw cross compilation with a distro-provided sysroot in /usr/x86_64-w64-mingw32. Test that the include directory is omitted in the mingw-sysroot.cpp tests, when cross compiling. That test is only ever executed on non-Windows hosts, since it uses symlinks to set up fake environments with colocated compilers and header/lib directories. There aren't really any current corresponding tests for the same implicit behaviours when actually running on Windows. Differential Revision: https://reviews.llvm.org/D141206
-
Joe Loser authored
Similar to how `makeArrayRef` is deprecated in favor of deduction guides, do the same for `makeMutableArrayRef`. Once all of the places in-tree are using the deduction guides for `MutableArrayRef`, we can mark `makeMutableArrayRef` as deprecated. Differential Revision: https://reviews.llvm.org/D141814
-
Mehdi Amini authored
When providing with a spirv module as input where no conversion happens the code didn't defend against broken invariant. We'll fail the pass here, but it's not clear if it is the right thing or if the module should just be ignored. Fixes #59971 Reviewed By: kuhar Differential Revision: https://reviews.llvm.org/D141856
-
Mahesh Ravishankar authored
The `candidateSliceOp` was replaces and used in a subsequent call. Instead just replace its uses. The op is dead and will be removed with CSE. Differential Revision: https://reviews.llvm.org/D141869
-
Slava Zakharin authored
In the process of creating the MDNodes for the TBAA tag operations we used to produce incomplete MDNodes like: ``` @__tbaa::@tbaa_tag_4 => !{!null, !null, i64 0} @__tbaa::@tbaa_tag_7 => !{!null, !null, i64 0} ``` This caused the two tags to map to the same incomplete MDNode due to uniquing. To prevent this, we have to use temporary MDNodes instead of !null's. Reviewed By: ftynse Differential Revision: https://reviews.llvm.org/D141726 -
Hendrik Greving authored
Fixes translating the calling convention to LLVM-IR, possibly missed by https://reviews.llvm.org/D126161, and adds a test.
-
Lei Huang authored
Fixes the patterns for the brh instruction to include a clrldi when emitted. Reviewed By: amyk Differential Revision: https://reviews.llvm.org/D141697
-
Ram-NK authored
Before D135808, There would be endless loop interchange posibility (no proper priority was there in profitability check. Any profitable check may leads to loop-interchange). With this patch, there is no endless interchange (priority in profitable check is defined. Order of decision is 'Cache cost' check, 'InstrOrderCost', 'Vectorization'). Corrected the dependency checking inside isProfitableForVectorization(), corrected the checking of bad order loops in isProfitablePerInstrOrderCost(). Reviewed By: Meinersbur, bmahjour, #loopoptwg Differential Revision: https://reviews.llvm.org/D135808
-
Alex Zinenko authored
The parser of gpu.launch_func was incorrectly rejecting SSA values with result numbers (`%0#0`) in the list of function arguments by using the `parseArgument` function intended for region argument declarations, not operands. Fix this by directly parsing comma-separated operands and types. Reviewed By: nicolasvasilache Differential Revision: https://reviews.llvm.org/D141851
-
Joseph Huber authored
Much like the changes in D141859, this patch allows the `nvptx-arch` tool to be built and provided with every distrubition of LLVM / Clang. This will make it more reliable for our toolchains to depend on. The changes here configure a version that dynamically loads CUDA if it was not found at build time. Reviewed By: tianshilei1992 Differential Revision: https://reviews.llvm.org/D141861
-
Joseph Huber authored
We use the `amdgpu-arch` tool to query the installed GPUs at runtime. One problem is that this tool is currently not build if the person building the LLVM binary does not have the HSA runtime on their system. This means that if someone built and distrubted an installation of LLVM without HSA, then the user will not be able to use it even if they have it on their system. This patch makes us build this tool unconditionally and adds extra logic to dynamically load HSA if it's present. Reviewed By: JonChesterfield Differential Revision: https://reviews.llvm.org/D141859
-
Kelvin Li authored
-
David Green authored
-
Simon Pilgrim authored
-
Nikolas Klauser authored
Reviewed By: Mordante, #libc Spies: libcxx-commits Differential Revision: https://reviews.llvm.org/D141799
-
Mahesh Ravishankar authored
This patch adds an option to the method that fuses a producer with a tiled consumer, to also yield from the tiled loops a value that can be used to replace the original producer. This is only valid if it can be assertained that the slice of the producer computed within each iteration of the tiled loop nest does not compute slices of the producer redundantly. The analysis to derive this is very involved. So this is left to the caller to assertain. A test is added that mimics the `scf::tileConsumerAndFuseProducersGreedilyUsingSCFForOp`, but also yields the values of all fused producers. This can be used as a reference for how a caller could use this functionality. Differential Revision: https://reviews.llvm.org/D141028
-
Simon Pilgrim authored
I'm helping with the remaining regressions on D127115, and one of my candidate fixes caused some regressions with MVE interleaved shuffles due to poor handling of 'truncation' style shuffle masks (0,2,4,6,...). This patch attempts to use the ARMISD::MVETRUNC node to handle these cases, based off existing code in LowerTruncate. It handles both (0,2,4,6,...) and (1,3,5,7,....) 'top' style patterns (assuming no endian problems). I shift down the 'top' patterns - a basic search of ARM docs suggests MVE has some top/bottom truncation/narrowing instructions but I don't seem to be able to get them to be used. Differential Revision: https://reviews.llvm.org/D141791
-