- Jul 22, 2022
-
-
Ryan Prichard authored
The default host CPU for an i386 triple is typically at least an i586, which has cmpxchg8b (Clang feature, "cx8"). Therefore, `__CLANG_ATOMIC_LLONG_LOCK_FREE` is 2 on the host, but the value should be 1 for the device. Also, grep for `__CLANG_ATOMIC_*` instead of `__GCC_ATOMIC_*`. The CLANG macros are always emitted, but the GCC macros are omitted for the *-windows-msvc targets. The `__GCC_HAVE_SYNC_COMPARE_AND_SWAP` macro always has GCC in its name, not CLANG, however. Reviewed By: tra Differential Revision: https://reviews.llvm.org/D127465
-
Ilia Diachkov authored
The patch adds SPIRVPrepareFunctions pass, which modifies function signatures containing aggregate arguments and/or return values before IR translation. Information about the original signatures is stored in metadata. It is used during call lowering to restore correct SPIR-V types of function arguments and return values. This pass also substitutes some llvm intrinsic calls to function calls, generating the necessary functions in the module, as the SPIRV translator does. The patch also includes changes in other modules, fixing errors and enabling many SPIR-V features that were omitted earlier. And 15 LIT tests are also added to demonstrate the new functionality. Differential Revision: https://reviews.llvm.org/D129730 Co-authored-by:
Aleksandr Bezzubikov <zuban32s@gmail.com> Co-authored-by:
Michal Paszkowski <michal.paszkowski@outlook.com> Co-authored-by:
Andrey Tretyakov <andrey1.tretyakov@intel.com> Co-authored-by:
Konrad Trifunovic <konrad.trifunovic@intel.com>
-
Nick Desaulniers authored
-
Philip Reames authored
This code confuses LV's "Uniform" and LVL/LAI's "Uniform". Despite the common name, these are different. * LVs notion means that only the first lane *of each unrolled part* is required. That is, lanes within a single unroll factor are considered uniform. This allows e.g. widenable memory ops to be considered uses of uniform computations. * LVL and LAI's notion refers to all lanes across all unrollings. IsUniformMem is in turn defined in terms of LAI's notion. Thus a UniformMemOpmeans is a memory operation with a loop invariant address. This means the same address is accessed in every iteration. The tweaked piece of code was trying to match a uniform mem op (i.e. fully loop invariant address), but instead checked for LV's notion of uniformity. In theory, this meant with UF > 1, we could speculate a load which wasn't safe to execute. This ends up being mostly silent in current code as it is nearly impossible to create the case where this difference is visible. The closest I've come in the test case from 54cb87, but even then, the incorrect result is only visible in the vplan debug output; before this change we sink the unsafely speculated load back into the user's predicate blocks before emitting IR. Both before and after IR are correct so the differences aren't "interesting". The other test changes are uninteresting. They're cases where LV's uniform analysis is slightly weaker than SCEV isLoopInvariant.
-
Philip Reames authored
This a reproducer for bug in predicated instruction handling. The final result code is correct, but the reasoning by which we get there isn't.
-
Craig Topper authored
We can always fold zext.b since it is just andi. The others require Zba/Zbb. Reviewed By: reames Differential Revision: https://reviews.llvm.org/D130302
-
Alexander Shaposhnikov authored
Relax the check to allow evaluation of atomic loads (but still skip volatile loads). Test plan: 1/ ninja check-llvm check-clang 2/ Bootstrapped LLVM/Clang pass tests Differential revision: https://reviews.llvm.org/D130211
-
LLVM GN Syncbot authored
-
Augusto Noronha authored
This reverts commit 23cf42e7.
-
LLVM GN Syncbot authored
-
Daniel Thornburgh authored
-
Chi Chun Chen authored
-
Joseph Huber authored
Summary: Some of the buildbots don't find the libraries because they don't build for the GPU. Although it should always be there it's unclear why these buildbots are having problemsd. LTO is only interesting on the GPU and these tests take extra time anyway so I'm just going to disable them for now.
-
Teresa Johnson authored
Adds a number of utilities that are used to help create and update memprof related metadata. These will be used during profile matching and annotation, as well as by the inliner when updating the metadata. Also adds unit tests for the utilities. See also related RFCs: RFC: Sanitizer-based Heap Profiler [1] RFC: A binary serialization format for MemProf [2] RFC: IR metadata format for MemProf [3] (Note that the IR metadata format has changed from the RFC during implementation, as described in the preceeding patch adding the basic metadata and verification support.) Depends on D128141. Differential Revision: https://reviews.llvm.org/D128854
-
Sam McCall authored
After this, NUMERIC_CONSTANT and strings should parse only one way. There are 8 types of literals, and 24 valid (literal, TokenKind) pairs. This means adding 8 new named guards (or 24, if we want to assert the token). It seems fairly clear to me at this point that the guard names are unneccesary indirection: the guards are in fact coupled to the rule signature. (Also add the zero guard I forgot in the previous patch.) Differential Revision: https://reviews.llvm.org/D130066
-
Ziqing Luo authored
message expressions For an Obj-C message expression `[o m]`, the adding matcher will match the declaration of the method `m`. This commit overloads the existing `callee` ASTMatcher, which originally was only for C/C++ nodes but also applies to Obj-C messages now. Reviewed By: aaron.ballman Differential Revision: https://reviews.llvm.org/D129398
-
Siva Chandra Reddy authored
Printf's integer converter has been modified to use the new converter. In future, it will be used to implement other parts of the libc. Reviewed By: michaelrj Differential Revision: https://reviews.llvm.org/D130227
-
Martin Storsjö authored
If we build the Target libraries with -fvisibility=hidden, then LLVM_EXTERNAL_VISIBILITY must also be able to override it back to default visibility. Currently, the LLVM_EXTERNAL_VISIBILITY define is a no-op for mingw targets, thus set CMAKE_CXX_VISIBILITY_PRESET correspondingly. This unbreaks the mingw dylib build, if the compiler actually takes hidden visiblity into account (e.g. after D130121). (Later, once hidden visiblity can be used for MinGW targets, we can make LLVM_EXTERNAL_VISIBILITY and LLVM_LIBRARY_VISIBILITY expand to actual attributes, and reverse this commit.) Differential Revision: https://reviews.llvm.org/D130200
-
Philip Reames authored
-
Jacques Pienaar authored
Missed previously and needed to flip the default. Most of these just flipped to _Raw to retain existing state/keep this small except for TOSA dialect which got flipped to _Both as no further change was needed..
-
Augie Fackler authored
-
Augie Fackler authored
This probably should have been part of D123089, but the effects of it don't show up until we start removing functions from the table in D130107. Oops. Differential Revision: https://reviews.llvm.org/D130184
-
Augie Fackler authored
This allows us to accept annotations from out-of-tree languages (the example test is derived from Rust) so they can enjoy the benefits of LLVM's optimizations without requiring LLVM to have language-specific knowledge. Differential Revision: https://reviews.llvm.org/D123091
-
Augie Fackler authored
Prior to this change, we relied on the hard-coded list for all of the information performed by MemoryBuiltins. With this change, we're able to start relying on properites of functions described in attributes, which opens the door to out-of-tree compilers being able to describe their allocator functions to LLVM's optimizer logic without having to register their implementation details with LLVM. Differential Revision: https://reviews.llvm.org/D123090
-
Sanjay Patel authored
[PatternMatch][InstCombine] match a vector with constant expression element(s) as a constant expression The InstCombine test is reduced from issue #56601. Without the more liberal match for ConstantExpr, we try to rearrange constants in Negator forever. Alternatively, we could adjust the definition of m_ImmConstant to be more conservative, but that's probably a larger patch, and I don't see any downside to changing m_ConstantExpr. We never capture and modify a ConstantExpr; transforms just want to avoid it. Differential Revision: https://reviews.llvm.org/D130286
-
Sanjay Patel authored
-
Arthur Eubanks authored
No need to add checks for every type per pointer that we couldn't create a check for the first time around, just the types that weren't successful. Reviewed By: fhahn Differential Revision: https://reviews.llvm.org/D119376
-
Philip Reames authored
Turns out this has a large effect of tail folding, so split out a single test to cover that case and remove it from the others.
-
John Ericson authored
First of all, `LLVM_TOOLS_INSTALL_DIR` put there breaks our NixOS builds, because `LLVM_TOOLS_INSTALL_DIR` defined the same as `CMAKE_INSTALL_BINDIR` becomes an *absolute* path, and then when downstream projects try to install there too this breaks because our builds always install to fresh directories for isolation's sake. Second of all, note that `LLVM_TOOLS_INSTALL_DIR` stands out against the other specially crafted `LLVM_CONFIG_*` variables substituted in `llvm/cmake/modules/LLVMConfig.cmake.in`. @beanz added it in d0e1c2a5 to fix a dangling reference in `AddLLVM`, but I am suspicious of how this variable doesn't follow the pattern. Those other ones are carefully made to be build-time vs install-time variables depending on which `LLVMConfig.cmake` is being generated, are carefully made relative as appropriate, etc. etc. For my NixOS use-case they are also fine because they are never used as downstream install vari...
-
Jacques Pienaar authored
At least two weeks passed since flipped to _Both. Made some additional NFC changes in .td files that were not converted earlier.
-
Daniel Thornburgh authored
-
Slava Zakharin authored
Try 2 to merge 4fbd1d6c. Flang algebraic simplification pass will run algebraic simplification rewrite patterns for Math/Complex/etc. dialects. It is enabled under opt-for-speed optimization levels (i.e. for O1/O2/O3; Os/Oz will not enable it). With this change the FIR/MLIR optimization pipeline becomes affected by the -O* optimization level switches. Until now these switches only affected the middle-end and back-end. Differential Revision: https://reviews.llvm.org/D130035
-
George Petterson authored
This is the same as the existing multiplier-1 variant of DepthwiseConv2D, but in PyTorch dim order. Reviewed By: nicolasvasilache Differential Revision: https://reviews.llvm.org/D128575
-
Daniel Thornburgh authored
This change implements the contextual symbolizer markup elements: reset, module, and mmap. These provide information about the runtime context of the binary necessary to resolve addresses to symbolic values. Summary information is printed to the output about this context. Multiple mmap elements for the same module line are coalesced together. The standard requires that such elements occur on their own lines to allow for this; accordingly, anything after a contextual element on a line is silently discarded. Implementing this cleanly requires that the filter drive the parser; this allows skipped sections to avoid being parsed. This also makes the filter quite a bit easier to use, at the cost of some unused flexibility. Reviewed By: peter.smith Differential Revision: https://reviews.llvm.org/D129519
-
Zequan Wu authored
If error occurs on constructing coverage info for one of the object files, it prints the name of the object file, so that users know which one is the cause of error. Differential Revision: https://reviews.llvm.org/D130196
-
Zequan Wu authored
[SemaCXX] Set promotion type for enum if its type is promotable to integer type even if it has no definition. EnumDecl's promotion type is set either to the parsed type or calculated type after completing its definition. When it's bool type and has no definition, its promotion type is bool which is not allowed by clang. Fixes #56560. Differential Revision: https://reviews.llvm.org/D130210
-
Philip Reames authored
-
Philip Reames authored
-
Anubhab Ghosh authored
-
Jez Ng authored
`advanceSubsection()` didn't account for the possibility that a section could have no subsections. Reviewed By: #lld-macho, thakis, BertalanD Differential Revision: https://reviews.llvm.org/D130288
-