- Mar 01, 2023
-
-
Tobias Gysi authored
The revision introduces two interfaces that provide access to the alias analysis and access group metadata attributes. The AliasAnalysis interface combines all alias analysis related attributes (alias, noalias, and tbaa) similar to LLVM's getAAMetadata method, while the AccessGroup interface is dedicated to the access group metadata. Previously, only the load and store operations supported alias analysis and access group metadata. This revision extends this support to the atomic operations. A follow up revision will also add support for the memcopy, memset, and memove intrinsics. The interfaces then provide convenient access to the metadata attributes and eliminate the need of TypeSwitch or string based attribute access. The revision still relies on string based attribute access for the translation to LLVM IR (except for tbaa metadata). Only once the the memory access intrinsics also implement the new interfaces, the translation to LLVM IR can be fully switched to use interface based attribute accesses. Depends on D144875 Reviewed By: ftynse Differential Revision: https://reviews.llvm.org/D144851
-
Balázs Kéri authored
During AST import multiple different InjectedClassNameType objects could be created for a single class template. This can cause problems and failed assertions when these types are compared and found to be not the same (because the instance is different and there is no canonical type). The import of this type does not use the factory method in ASTContext, probably because the preconditions are not fulfilled at that state. The fix tries to make the code in ASTImporter work more like the code in ASTContext::getInjectedClassNameType. If a type is stored at the Decl or previous Decl object, it is reused instead of creating a new one. This avoids crash at least a part of the cases. Reviewed By: gamesh411, donat.nagy, vabridgers Differential Revision: https://reviews.llvm.org/D140562
-
Benjamin Chetioui authored
Differential Revision: https://reviews.llvm.org/D144972
-
Sander de Smalen authored
The C and C++ Language Extensions for AArch64 SME2 [1] adds a new type called `svcount_t` which describes a predicate. This is not a predicate vector mask, but rather a description of a predicate vector mask that can be expanded into a mask using explicit instructions. The type is a scalable opaque type. To implement `svcount_t` type this patch uses the existing Target Extension Type mechanism, but adds further support so that this type can be a scalable type. AArch64 CodeGen support will follow in a separate patch. [1] https://github.com/ARM-software/acle/pull/217 Reviewed By: jcranmer-intel, nikic Differential Revision: https://reviews.llvm.org/D136861
-
Christian Ulmann authored
This commit ensures that the LLVMIR export prioritizes existing DILocalScope attribute information as location scopes over files constructed from filenames. All DILocalScope attributes contain file information, so no information is lost. The previous implementation caused the introduction of superfluous DILexicalBlockFile nodes in certain cases. The old implementation remains as a fallback when no DILocalScope is present. Reviewed By: gysit Differential Revision: https://reviews.llvm.org/D144968
-
Ben Shi authored
Different AVR devices have different data regions. Current clang driver emits a default '-Tdata' option to the linker. This way works fine if there is no user specified linker script, but it will cause conflicts if there is one. A better solution for setting the default data region to GNU ld is defining symbol __DATA_REGION_ORIGIN__, which is expected by GNU ld's default AVR linker script. Fixes https://github.com/llvm/llvm-project/issues/60362 Reviewed By: MaskRay Differential Revision: https://reviews.llvm.org/D144533
-
Emilio Cobos Alvarez authored
Let the branch fall through the error path like other functions here do. Differential Revision: https://reviews.llvm.org/D140074
-
Craig Topper authored
Instead of using getAsString on the dag operator, check if the operator is a DefInit and then get the name of the Def.
-
Noah Goldstein authored
SKX has an objectively faster shift than shuffle, on all other targets the two have equal performance (with maybe a slight preference for shifts because p5 is a more common bottleneck). Reviewed By: RKSimon Differential Revision: https://reviews.llvm.org/D143786
-
Noah Goldstein authored
`(xor/sub N-1, Y)` -> `(not Y)` is minorly preferable (especially for `(sub N-1, Y)` where it saves an instruction), but isn't worth potentially creating an extra instruction for. So, only do the transformation if `(xor/sub N-1, Y)` has one use. Reviewed By: RKSimon Differential Revision: https://reviews.llvm.org/D144985
-
Noah Goldstein authored
[X86] Fix `(shift X, (xor Y, N-1))` -> `(shift X, (not Y))` by properly inserting `not Y` into DAG. [#61038] Previously not inserting the `-1` in `not Y` (`xor Y, -1`) into the DAG. Not inserting `-1` as a DAG node comes up as a bug when doing `(xor (shl 1, A), B)` -> `(btc A, B)`. `btc` requires `B` (dst) to be a register. Differential Revision: https://reviews.llvm.org/D144984
-
Ting Wang authored
This patch reuse `PPCTargetLowering::isEligibleForTCO()` to check `PPCTTIImpl::supportsTailCallFor()`. Fixes #59315 Reviewed By: shchenz Differential Revision: https://reviews.llvm.org/D140369
-
Chuanqi Xu authored
This reverts commit 74565c3a. Since it looks like this one causes the modular libcxx build fails.
-
Chuanqi Xu authored
Revert "[C++20] [Modules] Trying to compare the trailing require clause from the primary template function" This reverts commit 9e50578b. Since it looks like this one prevents us to fix the modular build for libcxx.
-
Lian Wang authored
Reviewed By: serge-sans-paille Differential Revision: https://reviews.llvm.org/D144945
-
Wei Xiao authored
Put jump table in .rdata for Windows to align with that for Linux. It can avoid loading the same code page into I$ and D$ simultaneously and thus favor performance. Differential Revision: https://reviews.llvm.org/D144701
-
Kazu Hirata authored
This reverts commit 38a64aab. llvm-clang-x86_64-expensive-checks-debian is failing: https://lab.llvm.org/buildbot/#/builders/16/builds/44249
-
Vladimir Vereschaka authored
Disable `modules_include.sh.cpp` test on Windows build hosts, it cannot be executed there anymore. Differential Revision: https://reviews.llvm.org/D144640
-
Jim Ingham authored
initial stop. The code was using PrivateResume when it should have used Resume. This was allowing expression evaluation while the target was running, and though that was caught a litle later on, we should never have gotten that far. To make sure that this is caught immediately I made an error SBValue when this happens, and test that we get this error. Differential Revision: https://reviews.llvm.org/D144665
-
Robert Suderman authored
We can implement a polynomial approximation of math.tan by decomposing to `math.sin` and `math.cos`. While it is not technically a polynomial approximation it should be the most straight forward approximation. Reviewed By: jpienaar Differential Revision: https://reviews.llvm.org/D144980
-
Benjamin Chetioui authored
Reviewed By: rsuderman Differential Revision: https://reviews.llvm.org/D144971
-
Jim Ingham authored
-
Jason Molenda authored
The architecture dependent files for debugserver were built out of their own separate CMakeLists.txt for historical reasons; it's not necessary any longer. Remove that file and put them in the main debugserver CMakeLists.txt. Differential Revision: https://reviews.llvm.org/D145020 rdar://105993317
-
Jacob Young authored
With the Microsoft ABI, some destructors need to offset a parameter to get the derived this pointer, in which case the type of that parameter should not be a pointer to the derived type. Fixes #60465
-
Jim Ingham authored
hold an error should: (a) return false for IsValid, since that's the current behavior and is a convenient way to check "should I get the value for this". (b) preserve the error when an SBValue is made from it, and print the error in the ValueObjectPrinter. Make that happen. Differential Revision: https://reviews.llvm.org/D144664 -
Shoaib Meenai authored
32-bit targets don't build these by default, but e.g. armv7 and x86 can build them just fine, and it's useful to have the int128 routines available for certain applications. Add a CMake option to let us include the int128 routines for architectures which would otherwise lack them. Reviewed By: compnerd, MaskRay, phosek Differential Revision: https://reviews.llvm.org/D145003
-
Kazu Hirata authored
Without this patch, the control height reduction pass would combine a "poison" branch with an earlier well-defined branch, turning the earlier branch into a "poison" branch also. This patch fixes the problem by rejecting "poison" conditional branches. Differential Revision: https://reviews.llvm.org/D145008
-
Jim Ingham authored
The latter only checks built-in commands. I also added some docs to make the distinction clear and a test. Differential Revision: https://reviews.llvm.org/D144929
-
Alan Hu authored
The OCaml bindings currently return pointers to LLVM objects as-is to OCaml. These "naked pointers" end up appearing as values of local variables in OCaml code, stored as part of other OCaml values, etc. The safety of this design relies on the OCaml runtime system's ability to distinguish these pointers from pointers to memory on the OCaml garbage collected heap. In particular, when the OCaml GC encounters a pointer to memory known to not be part of the OCaml heap, it does not follow it. In OCaml 4.02 an optimized "no naked pointers" mode was introduced where the runtime system does not perform such checks and requires that no such naked pointers be passed to OCaml code, instead one of several encodings needs to be used. In OCaml 5, the no naked pointers mode is now the only mode. This diff uses one of the potential encodings to eliminate naked pointers, making the LLVM OCaml bindings compatible with the "no naked pointers" mode of OCaml >= 4.02 ...
-
Haohai Wen authored
The previous Alderlake P-Core model prefer data from uops.info than intel doc. Some measures latency from uops.info is larger than real latency. e.g. addpd latency is 3 in uops.info while 2 in intel doc. This patch adjust the priority of those two data source so that intel doc is more preferable. Reviewed By: RKSimon Differential Revision: https://reviews.llvm.org/D144388
-
Wei Wang authored
We shouldn't access coro frame after returning from `await_suspend()` and before `llvm.coro.suspend()`. Make sure we always hoist conditional cleanup markers when inside the `await.suspend` block. Fix https://github.com/llvm/llvm-project/issues/59181 Reviewed By: ChuanqiXu Differential Revision: https://reviews.llvm.org/D144680
-
Haowei Wu authored
This patch enables LLVM_USE_RELATIVE_PATHS_IN_FILES when building the bootstrap toolchain for 2 stages build. Differential Revision: https://reviews.llvm.org/D145010
-
Kazu Hirata authored
Without this patch: %cmp = icmp eq i32 %a, %b %cond = select i1 %cmp, i32 1, i32 2 is compiled as: 31 c9 xor %ecx,%ecx 39 f7 cmp %esi,%edi 0f 94 c1 sete %cl b8 02 00 00 00 mov $0x2,%eax 29 c8 sub %ecx,%eax With this patch, the compiler generates: 31 c0 xor %eax,%eax 39 f7 cmp %esi,%edi 0f 95 c0 setne %al ff c0 inc %eax saving 5 bytes while reducing register usage. This patch transforms C - setcc into inverted_setcc + (C-1) if C is a nonzero constant. This patch fixes: https://github.com/llvm/llvm-project/issues/60854 Differential Revision: https://reviews.llvm.org/D144449
-
Mitch Phillips authored
AllocMeta could be null when returned from __gwp_asan_get_metadata() for a bad access into the GuardedPagePool that was never allocated. Currently, then we dereference the null pointer, oops. Hoist the check up and print a message (only once in recoverable mode) about the bad memory access. Reviewed By: fmayer Differential Revision: https://reviews.llvm.org/D144973
-
ManuelJBrito authored
This reverts commit 9e58182d.
-
ManuelJBrito authored
Ignoring freeze(undef) if it has multiple uses in LowerAVXCONCAT_VECTORS causes the custom INSERT_SUBVECTOR for vector widening to be ignored. Differential Revision: https://reviews.llvm.org/D14490
-
Jason Molenda authored
Also a few small fixes for building debugserver on iOS in c++17.
-
Jakub Kuderski authored
This defines the iterator tuple based on the storage type of `zippy`, instead of its type arguments. This way, we can support temporaries that gets passed in and allow for them to be modified during iteration. Because the iterator types to the tuple storage can have different types when the storage is and isn't const, this defines a const iterator type and non-const `begin`/`end` functions. This way we avoid unintentional casts, e.g., trying to cast `vector<bool>::reference` to `vector<bool>::const_reference`, which may be unrelated types that are not convertible. This patch is a general and free-standing improvement but my primary use is in the implemention a version of `enumerate` that accepts multiple ranges: D144583. Reviewed By: dblaikie, zero9178 Differential Revision: https://reviews.llvm.org/D144834
-
Joseph Huber authored
The patch in D136100 added custom handling for pragmas to assist in formatting OpenMP clauses correctly. One of these changes added extra indentation. This is desirable for OpenMP pragmas as they are several complete tokens that would otherwise we on the exact same line. However, this is not desired for the other pragmas. This solution is extremely hacky, I'm not overly familiar with the `clang-format` codebase. A better solution would probably require actually parsing these as tokens, but I just wanted to propose a solution. Fixes https://github.com/llvm/llvm-project/issues/59473 Reviewed By: HazardyKnusperkeks Differential Revision: https://reviews.llvm.org/D144884
-
Peiming Liu authored
While dense tensors support random accesses, it is critical to visit them in a row-major order for better cache locality. However, we previously consider dense inputs and outputs together when computing constraints for building iteration graph, it could lead us to less efficient iteration graphs. This patch adds a new `SortMask::kIncludeDenseInput` to treat dense inputs/outputs separately when building iteration graph, thus increasing the chance for use to construct a better iteration graph. A more fine-grained approach is to treat each input separately. Note, related to: https://github.com/llvm/llvm-project/issues/51651 Reviewed By: aartbik Differential Revision: https://reviews.llvm.org/D144932
-