- Jan 27, 2023
-
-
Michael Buch authored
This patch adds support for `TemplateArgument`s of kind `TemplateArgument::Expression` to `clang::isSubstitutedDefaultArgument`. We do so by evaluating both the `Pattern` and `Arg` expression to an `APInt`, if we can, and comparing the results. This will be useful in an upcoming change where `clang::isSubstitutedDefaultArgument` gets called from `clang::Sema` where the `TemplateArgument`s are instantiated as expressions (without being evaluted to `APInt` beforehand). **Testing** - Added unit-tests Differential Revision: https://reviews.llvm.org/D142632
-
Jordan Rupprecht authored
-
Phoebe Wang authored
This patch is inspired by D111433. It would affect the performance under strict FP mode. But it preserves the correct rounding behavior accross function calls. Fixes #59305 Reviewed By: sepavloff Differential Revision: https://reviews.llvm.org/D139549
-
Jordan Rupprecht authored
-
Emilia Dreamer authored
There should not be any cases where the angle brackets of template parameters are directly followed by a literal. It is more likely that a comparison is taking place instead. This patch makes the TokenAnnotator prefer to annotate < and > as operators when directly followed by a literal. A similar check already exists for literals directly *before* potential template args. Fixes https://github.com/llvm/llvm-project/issues/60140 Reviewed By: HazardyKnusperkeks, owenpan, MyDeveloperDay Differential Revision: https://reviews.llvm.org/D142139
-
Hanhan Wang authored
Reviewed By: mravishankar Differential Revision: https://reviews.llvm.org/D141977
-
Jez Ng authored
By using emplace_back, as well as converting some loops to for-each, we can do more efficient vectorization. Make copy constructor for TemporaryFile noexcept. Reviewed By: #lld-macho, int3 Differential Revision: https://reviews.llvm.org/D139552
-
Tom Stellard authored
Reviewed By: amyk, dim, hans Differential Revision: https://reviews.llvm.org/D142417
-
Jordan Rupprecht authored
This test manually sends `terminateCommands` to shutdown, but then the test attempts another `terminateCommands` request in test tear down, which fails since it's already torn down. This error is ignored in LLDB's old fork of unittest2, but will be reported as a test failure in `unittest` from the Python standard library. Use `disconnectAutomatically` to avoid terminating twice.
-
Benjamin Kramer authored
-
Slava Zakharin authored
CheckDoConcurrentClauseRestriction and CheckTileClauseRestriction expect that the construct has associated DoConstruct, while it is not set when the do-loop has no loop control. The change is to skip the clauses checks, when the do-loop does not have the loop control. An alternative fix would be to associate the DoConstruct even when the do-loop has no loop control and let Check*ClauseRestriction run their checks, but I am not sure if associating invalid DoConstruct is a good idea. This fixes failure in Semantics/OpenACC/acc-canonicalization-validity.f90 reported in D142279. Reviewed By: clementval Differential Revision: https://reviews.llvm.org/D142652
-
Slava Zakharin authored
This fixes unittest failures reported in D142279: flang-Unit :: Frontend/./FlangFrontendTests/5/7 flang-Unit :: Frontend/./FlangFrontendTests/6/7
-
Nicolas Vasilache authored
This PR adds a `pack_greedily` transform operation that infers the packing for gemm subcomputations embedded within in any LinalgOp and packs accordingly. A normalization step guarantees that we get the innermost op dimensions in one of `8` possible `(m, n, k)` orders, specified as a parameter, from which we can emit all packed forms. The current implementation takes an arbitrary LinalgOp and tries to pack it along the specified dimensions with specified sizes and inner dim permutation. This achieves a new level of normalization and generalization for any `n-D` LinalgOp that contains a gemm embedded within it: we will always see a predictable packed form for any of these ops. Differential Revision: https://reviews.llvm.org/D142661
-
Elizabeth Andrews authored
-
Dominik Adamski authored
Currently default simd alignment is defined by Clang specific TargetInfo class. This class cannot be reused for LLVM Flang. That's why default simd alignment calculation has been moved to OMPIRBuilder which is common for Flang and Clang. Previous attempt: https://reviews.llvm.org/D138496 was wrong because the default alignment depended on the number of built LLVM targets. If we wanted to calculate the default alignment for PPC and we hadn't specified PPC LLVM target to build, then we would get 0 as the alignment because OMPIRBuilder couldn't create PPCTargetMachine object and it returned 0 as the default value. If PPC LLVM target had been built earlier, then OMPIRBuilder could have created PPCTargetMachine object and it would have returned 128. Differential Revision: https://reviews.llvm.org/D141910 Reviewed By: jdoerfert
-
Joseph Huber authored
Summary: Clang doesn't warn on `-B` options passed to it. This one is not forwarded to the linker which results in some tests failing when offloading to x86_64 with the `bfd` linker.
-
Daniel Thornburgh authored
Reviewed By: gulfem Differential Revision: https://reviews.llvm.org/D136702
-
WuXinlong authored
This patch add the instructions of Zcb extension. Instructions in zcb extensions shorten part of bit manipulation instructions. Co-authored-by:
Craig Topper <craig.topper@sifive.com> Reviewed By: craig.topper Differential Revision: https://reviews.llvm.org/D131141
-
Kazu Hirata authored
This patch removes findFirstSet and findLastSet as there are no uses left in LLVM. I am not aware of any uses of findFirstSet and findLastSet in the open-source world outside LLVM, so I am skipping the deprecation step. Differential Revision: https://reviews.llvm.org/D142603
-
Mike Hommey authored
This strips out about 5k symbols. Fixes https://github.com/llvm/llvm-project/issues/60109 Reviewed By: john.brawn Differential Revision: https://reviews.llvm.org/D142431
-
Louis Dionne authored
Differential Revision: https://reviews.llvm.org/D142566
-
LLVM GN Syncbot authored
-
Louis Dionne authored
They are not needed in <new> -- in fact they are only needed in .cpp files. Getting those out of the way makes the headers smaller and also makes it easier to use the library on platforms where aligned allocation is not available. Differential Revision: https://reviews.llvm.org/D139231
-
Ivan Kosarev authored
https://reviews.llvm.org/D142405 made this function relying on the LLVM_NATIVE_ARCH be defined, which is not necessarily the case for third-party projects that include LLVM as their part. Reviewed By: beanz Differential Revision: https://reviews.llvm.org/D142610
-
Paul Kirth authored
This patch updates examples in the documentation to match the existing convention. Calls to intrinsics that have metadata arguments were not included. Reviewed By: dexonsmith Differential Revision: https://reviews.llvm.org/D142651
-
Artem Belevich authored
Fixes https://github.com/llvm/llvm-project/issues/46954 The assumption that generic pointers passed to a CUDA kernel is CUDA-specific and should not be applied to non-CUDA compilations. Addrspacecasts to global AS and back should never be applied to AS-specific pointers. In order to make tests actually do the testing for non-CUDA compilation, we need to get TargetMachine from the TargetPassConfig, instead of passing it explicitly as a pass constructor argument. Differential Revision: https://reviews.llvm.org/D142581
-
Joseph Huber authored
The `OpenMPOpt` pass is pivotal to the performance of many OpenMP offloading programs. When we perform non-LTO builds with OpenMP we used to link the OpenMP deviceRTL individually for each TU. This lead to us getting an additional attributor run on the combined runtime and user code. When we used LTO we lost a run and suffered a large performance degradation. This patch simply adds in the extra `OpenMPOpt` pass that we miss into the LTO pipeline. This patch fixes the performance regression shown in applications that used OpenMP offloading in LTO mode. Previously, this wasn't legal to do as we could emit new runtime calls into the module. That was fixed by D142646. Depends on D142646 Fixes https://github.com/llvm/llvm-project/issues/60300 Reviewed By: jdoerfert Differential Revision: https://reviews.llvm.org/D142650
-
Joseph Huber authored
The `OpenMPOpt` pass contains optimizations that generate new calls into the OpenMP runtime. This causes problems if we are in a state where the runtime has already been linked statically. Generating these new calls will result in them never being resolved. We should indicate if we are in a "post-link" LTO phase and prevent OpenMPOpt from generating new runtime calls. Generally, it's not desireable for passes to maintain state about the context in which they're called. But this is the only reasonable solution to static linking when we have a pass that generates new runtime calls. Reviewed By: jdoerfert Differential Revision: https://reviews.llvm.org/D142646
-
Zahira Ammarguellat authored
is enabled. In fast math mode some floating-point optimizations are performed such as reassociation and distribution. For example, the compiler may transform (a+b)+c into a+(b+c). Although these two expressions are equivalent in integer arithmetic, they may not be in floating-point arithmetic. The builtin tells the compiler that the expression in parenthesis can’t be re-associated or distributed. __arithmetic_fence(a+b)+c is not equivalent to a+(b+c). This patch adds the support of the builtin to SPIR target. Differential Revision: https://reviews.llvm.org/D142583
-
Erich Keane authored
As came up in the discussion on https://reviews.llvm.org/rG12cb1cb3720de8d164196010123ce1a8901d8122 We were asserting because the attempt to print a note found that our source range for a immediately declared constraint (as a part of Parameter Mapping Substitution) wasn't in order. However, it doesn't really make sense to have the location of this be the whole list of template arguments, as that would result in the range being: bool func(std::thing<char*> auto foo) {} ^^^^^^^^^^^^^^^ Even if done correctly. Instead, this patch makes the range be just 'foo' in this case (or a pointer right after 'auto' if unnamed).
-
Arthur Eubanks authored
Reviewed By: asbirlea Differential Revision: https://reviews.llvm.org/D142571
-
Joseph Huber authored
Summary: These comments are confusing as the `clang-offload-bundler` is no longer used by these toolchains.
-
einvbri authored
Change https://reviews.llvm.org/D140059 exposed the following crash in Z3Solver, where bit widths were not checked consistently with that change. This change makes the check consistent, and fixes the crash. ``` clang: <root>/llvm/include/llvm/ADT/APSInt.h:99: int64_t llvm::APSInt::getExtValue() const: Assertion `isRepresentableByInt64() && "Too many bits for int64_t"' failed. ... Stack dump: 0. Program arguments: clang -cc1 -internal-isystem <root>/lib/clang/16/include -nostdsysteminc -analyze -analyzer-checker=core,unix.Malloc,debug.ExprInspection -analyzer-config crosscheck-with-z3=true -verify reproducer.c #0 0x00000000045b3476 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) <root>/llvm/lib/Support/Unix/Signals.inc:567:22 #1 0x00000000045b3862 PrintStackTraceSignalHandler(void*) <root>/llvm/lib/Support/Unix/Signals.inc:641:1 #2 0x00000000045b14a5 llvm::sys::RunSignalHandlers() <root>/llvm/lib/Support/Signals.cpp:104:20 #3 0x00000000045b2eb...
-
Sanjay Patel authored
https://alive2.llvm.org/ce/z/7J8Exr This is a commuted variant that was not included in: D138853 / f2973327
-
Sanjay Patel authored
Existing tests were added with D138853, but that patch failed to handle all of the commutes. The poison-safety behavior is symmetric, so I'm not duplicating all of the tests that were added with that patch.
-
Stanislav Mekhanoshin authored
Differential Revision: https://reviews.llvm.org/D142507
-
Jonas Paulsson authored
Review: Ulrich Weigand
-
Alex Brachet authored
Differential Revision: https://reviews.llvm.org/D142649
-
Paul Kirth authored
Reviewed By: phosek Differential Revision: https://reviews.llvm.org/D142564
-
Jay Foad authored
Differential Revision: https://reviews.llvm.org/D142648
-