- Sep 29, 2023
-
-
Jie Fu authored
/llvm-project/clang/lib/AST/ASTContext.cpp:12938:46: error: unused variable 'DY' [-Werror,-Wunused-variable] const auto *DX = cast<DecltypeType>(X), *DY = cast<DecltypeType>(Y); ^ 1 error generated. -
Matheus Izvekov authored
While a DecltypeType node itself is not uniqued, an instantiation dependent DecltypeType will have a DependentDecltypeType as an underlying type, which is uniqued. In that case, there can be non-identical non-sugar DecltypeTypes nodes which nonetheless represent the same type. Fixes https://github.com/llvm/llvm-project/issues/67603
-
Tobias Stadler authored
The legalizer currently generates lots of G_AND artifacts. For example between boolean uses and defs there is always a G_AND with a mask of 1, but when the target uses ZeroOrOneBooleanContents, this is unnecessary. Currently these artifacts have to be removed using post-legalize combines. Omitting these artifacts at their source in the artifact combiner has a few advantages: - We know that the emitted G_AND is very likely to be useless, so our KnownBits call is likely worth it. - The G_AND and G_CONSTANT can interrupt e.g. G_UADDE/... sequences generated during legalization of wide adds which makes it harder to detect these sequences in the instruction selector (e.g. useful to prevent unnecessary reloading of AArch64 NZCV register). - This cleans up a lot of legalizer output and even improves compilation-times. AArch64 CTMark geomean: `O0` -5.6% size..text; `O0` and `O3` ~-0.9% compilation-time (instruction count). Since this introduces KnownBits into code-paths used by `O0`, I reduced the default recursion depth. This doesn't seem to make a difference in CTMark, but should prevent excessive recursive calls in the worst case. Reviewed By: aemerson Differential Revision: https://reviews.llvm.org/D159140
-
Quinn Dawkins authored
GPU targets can gather on non-default address spaces (e.g. global), so this removes the check for the default memory space.
-
Prem Chintalapudi authored
This patch adds line numbers to perf jitdump records emitted by the PerfSupportPlugin, by parsing and using a DWARFContext from preserved debug sections. To avoid making the OrcJIT library depend on DebugInfoDWARF this patch introduces a new OrcDebugging library. Reviewed By: lhames Differential Revision: https://reviews.llvm.org/D146391
-
Noah Goldstein authored
Poison generating return attributes can't be propagated the same as others, as they can change the behavior of other uses and/or create UB where it otherwise wouldn't have occurred. For example: ``` define nonnull ptr @foo() { %p = call ptr @bar() call void @use(ptr %p) ret ptr %p } ``` If we inline `@foo` and propagate `nonnull` to `@bar`, it could change the behavior of `@use` as instead of taking `null`, `@use` will now be passed `poison`. This can be even worth in a case like: ``` define nonnull ptr @foo() { %p = call noundef ptr @bar() ret ptr %p } ``` Where propagating `nonnull` to `@bar` will cause UB on `null` return of `@bar` (`noundef` + `poison`) where it previously wouldn't have occurred. To fix this, we only propagate poison generating return attributes if either 1) The only use of the callsite to propagate too is return and the callsite to propagate too doesn't have `noundef`. Or 2) the callsite to be be inlined has `noundef`. The former case ensures no new UB or `poison` values will be added. The latter is UB anyways if the value is `poison` so we can go ahead without worrying about behavior changes. -
Noah Goldstein authored
-
Jan Svoboda authored
-
Jan Svoboda authored
-
Amy Huang authored
This implements the [[msvc::no_unique_address]] attribute. There is not ABI compatibility in this patch because the attribute is relatively new and there's still some uncertainty in the MSVC version. The recommit changes the attribute definitions so that instead of making two separate attributes for no_unique_address and msvc::no_unique_address, it modifies the attributes tablegen emitter to allow spellings to be target-specific. This reverts commit 71f9e769.
-
Kazu Hirata authored
-
Kazu Hirata authored
This patch fixes: flang/lib/Lower/OpenACC.cpp:876:14: error: unused variable 'nbRangeArgs' [-Werror,-Wunused-variable]
-
Slava Zakharin authored
Example: ``` module types type t real,allocatable :: c end type t contains function h(x) class(t),allocatable :: h ... end function h subroutine test type(t),allocatable :: b(:) allocate(b(2),source=h(2.5)) end subroutine test7 end module type ``` `DoFromSourceAssign` creates two descriptors for initializing `b(1)` and `b(2)` from the result of `h`. This Create call creates a descriptor without properly initialized addendum, so the Assign just does shallow copies of the descriptor representing result of `h` into `b(1)` and `b(2)`. I modified Create code to properly establish the descriptor for derived type case. I had to keep the `addendum` argument to keep the testing in `flang/unittests/Runtime/TemporaryStack.cpp`. -
lntue authored
[libc][math] Implement double precision expm1 function correctly rounded for all rounding modes. (#67048) Implementing expm1 function for double precision based on exp function algorithm: - Reduced x = log2(e) * (hi + mid1 + mid2) + lo, where: * hi is an integer * mid1 * 2^-6 is an integer * mid2 * 2^-12 is an integer * |lo| < 2^-13 + 2^-30 - Then exp(x) - 1 = 2^hi * 2^mid1 * 2^mid2 * exp(lo) - 1 ~ 2^hi * (2^mid1 * 2^mid2 * (1 + lo * P(lo)) - 2^(-hi) ) - We evaluate fast pass with P(lo) is a degree-3 Taylor polynomial of (e^lo - 1) / lo in double precision - If the Ziv accuracy test fails, we use degree-6 Taylor polynomial of (e^lo - 1) / lo in double double precision - If the Ziv accuracy test still fails, we re-evaluate everything in 128-bit precision.
-
Valentin Clement (バレンタイン クレメン) authored
This patch makes use of the bounds in the combiner region for known shape arrays. Until know the combiner region was iterating over the whole array. Lowerbound, upperbound and step are passed as block arguments after the two values. A follow up patch will make use of this information for the assumed shape arrays as well.
-
ChiaHungDuan authored
We used to update the deallocated block with atomic_compare_exchange_strong to ensure the concurrent double-free will be detected. However, this operation incurs huge performance overhead which takes over 50% execution time in deallocate(). Given that we already have the checksum to guard the most double-free cases and other block verifications in the primary allocator, use atomic-store instead.
-
Jan Svoboda authored
-
Jan Svoboda authored
-
Aart Bik authored
MLIR official build is not quite at 12.1 yet, so until then we protext the Bsr method with a macro guard
-
Jay Foad authored
Fix: -amdgpu-disable-unclustred-high-rp-reschedule Now: -amdgpu-disable-unclustered-high-rp-reschedule
-
androm3da authored
-
Joseph Huber authored
Summary: Previously this test hanged indefinitely on NVPTX. This was due to an issue fixed previously where we would wait indefinitely inside the CUDA runtime waiting for the kernel to complete if it was blocked on the RPC server. This patch enables this test again now that it can run without deadlocking, at least on CUDA 12.2.
-
Valentin Clement (バレンタイン クレメン) authored
This patch adds correct support for the assumed shape arrays in the privatization recipes. This follows the same IR generation than in #67610.
-
Kunwar Grover authored
The offset when converting type in emulating narrow types did not account for the offset in strided memrefs. This patch fixes this.
-
Thurston Dang authored
My patch (https://github.com/llvm/llvm-project/commit/b3b6edefdb7ae77e4b2344c9a64fd1d486c91405) broke the build (https://lab.llvm.org/buildbot/#/builders/5/builds/37053) because it incorrectly assumed LoopInfo could not be null and used a reference. This fixes forward by replacing &LI with *LI.
-
Craig Topper authored
…ptzn. This changes performStackMoveOptzn to take a TypeSize instead of uint64_t to avoid an implicit conversion when called from processStoreOfLoad. performStackMoveOptzn has been updated to allow scalable types in the rest of its code.
-
Shafik Yaghmour authored
CheckDefaultArgumentVisitor::Visit(...) assumes that the children of Expr will not be NULL. This is not a valid assumption and when we have a CXXFoldExpr the children can be NULL and this causes a crash. Fixes: https://github.com/llvm/llvm-project/issues/67395
-
Alex Langford authored
The LLVM implementation of DWARFDebugAbbrev does not have a way of listing all the DW_FORM values that have been parsed but are unsupported or otherwise unknown. AFAICT this functionality does not exist in LLVM at all. Since my primary goal is to unify the implementations and not judge the usefulness or completeness of this functionality, I decided to move it out of LLDB's implementation of DWARFDebugAbbrev for the time being.
-
Hans Wennborg authored
The new implementation was brought in with the gtest update in a866ce78, but it crashes when building with rpmalloc, see https://github.com/llvm/llvm-project/pull/65823#issuecomment-1739820534 Comment out the new implementation basically gives us the code before the gtest update.
-
Jon Phillips authored
[clang-format] Disable OuterScope lambda indentation behaviour for constructor initializers (#66755) By default, OuterScope aligns lambdas to the beginning of the current line. This makes sense for most types of statements within code blocks but leads to unappealing and misleading indentation for lambdas within constructor initializers.
-
Leonard Chan authored
This uses a custom size class map and primary allocator arena size that allows us to run all bringup tests on riscv64 with asan instrumentation reliabely. Differential Revision: https://reviews.llvm.org/D151157
-
Alexey Bataev authored
This reverts commit c88c281c to fix the crash revealed by https://lab.llvm.org/buildbot/#/builders/230/builds/19353.
-
Yingwei Zheng authored
This patch canonicalizes the pattern `and(zext(A), B)` into `select A, B & 1, 0`. Thus, we can reuse transforms `select B == even, B & 1, 0 -> 0` and `select B == odd, B & 1, 0 -> zext(B == odd)` in `InstCombine`. It is an alternative to #66676. Alive2: https://alive2.llvm.org/ce/z/598phE Fixes #66733. Fixes #66606. Fixes #28612.
-
Aart Bik authored
Add CSC, but also adds BSR as a future format. Coming soon!
-
Noah Goldstein authored
The middle end canonicalizes: `(and (zext c), X)` -> `(select c, (and X, 1), 0)` But the `and` + `zext` form gets better codegen. -
Noah Goldstein authored
[X86][AArch64][RISCV] Add tests for combining `(select c, (and X, 1), 0)` -> `(and (zext c), X)`; NFC
-
prabhukr authored
Adding support for X86_64 UEFI target to begin with. Reviewed By: phosek, MaskRay Differential Revision: https://reviews.llvm.org/D152206
-
Ian Anderson authored
Including select builtin headers in system modules is a workaround for module cycles, primarily in Apple's Darwin module that includes all of its C standard library headers. The workaround is problematic because it doesn't include all of the builtin headers (inttypes.h is notably absent), and it also doesn't include C++ headers. The straightforward for for this is to make top level modules for all of the C standard library headers and unwind.h in C++, clang, and the OS. However, doing so in clang before the OS modules are ready re-introduces the module cycles. Add a -fbuiltin-headers-in-system-modules option to control if the special builtin headers belong to system modules or builtin modules. Pass the option by default for Apple. Reviewed By: ChuanqiXu, Bigcheese, benlangmuir Differential Revision: https://reviews.llvm.org/D159483
-
Louis Dionne authored
This NFC change was reverted as part of 880fa7fa, but the change is really good regardless of the associated Clang patch.
-
Alexey Bataev authored
Need to add NumSrcElts param to is..Mask functions in ShuffleVectorInstruction class for better mask analysis. Mask.size() not always matches the sizes of the permuted vector(s). Allows to better estimate the cost in SLP and fix uses of the functions in other cases. Differential Revision: https://reviews.llvm.org/D158449
-