- Aug 17, 2022
-
-
Dmitri Gribenko authored
Reviewed By: samestep, xazax.hun Differential Revision: https://reviews.llvm.org/D131975
-
Nicolas Miller authored
This patch fixes an issue where an instruction reading a whole register would be moved during register allocation into a spot where one of the subregisters was dead. The code to check whether an instruction can be rematerialized at a given point or not was already checking for subranges to ensure that subregisters are live, but only when the instruction being moved was using a subregister, this patch changes that so the subranges are checked even when the moved instruction uses the full register. This patch also adds a case to the original test for the subrange checking that trigger the issue described above. The original subrange checking code was introduced in this revision: https://reviews.llvm.org/D115278 And I've encountered this issue on AMDGPUs while working with DPC++: https://github.com/intel/llvm/issues/6209 Essentially the greedy register allocator attempts to move the following instruction: ``` %3961:vreg_64 = V_LSHLREV_B64_e64 3, %3078:vreg_64, implicit $exec ``` From `@3440` into the body of a loop `@16312`, but `%3078` has the following live ranges: ``` %3078 [2224r,2240r:0)[2240r,3488B:1)[16192B,38336B:1) 0@2224r 1@2240r L0000000000000003 [2224r,3440r:0) 0@2224r L000000000000000C [2240r,3488B:0)[16192B,38336B:0) 0@2240r ``` So `@16312e` `%3078.sub1` is alive but `%3078.sub0` is dead, so this instruction being moved there leads to invalid memory accesses as `3078.sub0` ends up being trashed and the result of this instruction is used as part of an address calculation for a load. On the original ticket this issue showed up on gfx906 and gfx90a but not on gfx908, this turned out to be because on gfx908 instead of moving the shift instruction into the loop, its value is spilled into an ACC register, gfx906 doesn't have ACC registers and for gfx90a ACC registers are used like regular vector registers and so aren't used for spilling. With this patch the original application from the DPC++ ticket works properly on gfx906, and the result of the shift instruction is correctly spilled instead of moving the instruction in the loop. Original Author: npmiller Reviewed by: rampitec Submitted by: rampitec Differential Revision: https://reviews.llvm.org/D131884
-
David Blaikie authored
-Wctad-maybe-unsupported is now disabled for flang so these explicit deduction guides are not required. This reverts commit 248591aa.
-
David Blaikie authored
-Wctad-maybe-unsupported is now disabled for flang so these explicit deduction guides are not required. This reverts commit ec3956b6.
-
David Blaikie authored
-
Zequan Wu authored
-
Mark de Wever authored
This changes makes it easier to update the Unicode data files used for the Extended Graphme Clustering as added in D126971. Reviewed By: ldionne, #libc Differential Revision: https://reviews.llvm.org/D129668
-
Mark de Wever authored
Allow bulk output operations on the buffer instead of adding one code unit at a time. This has a huge performance benefit at the cost of larger binary. This doesn't implement @vitaut's earlier suggestion to avoid buffering for std::string when writing a strings. That can be done in a follow-up patch. There are some minor complications for the non-buffered format_to_n. When writing one character at a time it's easy to detect when reaching the limit n. This is solved by adding a small overhead for format_to_n. When the next write would overflow it stores the data in the internal buffer and copies that up-to n code units. The overhead isn't measured, but it's expected to only be an issue for small values of n; for larger values the general improvements will outweight the new overhead. ``` text data bss dec hex filename 349081 6096 440 355617 56d21 format.libcxx.out-baseline 344442 6088 440 350970 55afa formatted_size.libcxx.out...
-
Vitaly Buka authored
-
Slava Zakharin authored
The operation computes pow(b, p), where 'b' is floating point and 'p' is a signed integer. The result's type matches 'b' type. The operands must have the same shape. Differential Revision: https://reviews.llvm.org/D129811
-
Steven Wu authored
As a followup to https://reviews.llvm.org/D131593, clean up gRPC related option names and messages to make them more generic.
-
David Blaikie authored
-
- Aug 16, 2022
-
-
Simon Pilgrim authored
[ValueTracking] computeKnownBits - attempt to use a branch condition feeding a phi to improve known bits range (PR38280) If computeKnownBits encounters a phi node, and we fail to determine any known bits through direct analysis, see if the incoming value is part of a branch condition feeding the phi. Handle cases where icmp(IncomingValue PRED Constant) is driving a branch instruction feeding that phi node - at the moment this only handles EQ/ULT/ULE predicate cases as they are the most straightforward to handle and most likely for branch-loop 'max upper bound' cases - we can extend this if/when necessary. I investigated a more general icmp(LHS PRED RHS) KnownBits system, but the hard limits we put on value tracking depth through phi nodes meant that we were mainly catching constants anyhow. Fixes the pointless vectorization in PR38280 / Issue #37628 (excessive unrolling still needs handling though) Differential Revision: https://reviews.llvm.org/D131838
-
Emmmer authored
Add: - `EmulateInstructionRISCV`, which can be used for riscv32 and riscv64. - Add unittests for EmulateInstructionRISCV. Note: Compressed instructions set (RVC) was still not supported in this patch. Reviewed By: DavidSpickett Differential Revision: https://reviews.llvm.org/D131759
-
Emmmer authored
In this switch case we didn't handle possible errors in `ResumeThread()`, it's hard to get helpful information when it goes wrong. Reviewed By: DavidSpickett Differential Revision: https://reviews.llvm.org/D131946
-
Emmmer authored
Some architectures do not have a flag register (like riscv). In this case, we should set it to `baton.m_register_values.end()` to avoid nullptr exception. Reviewed By: DavidSpickett Differential Revision: https://reviews.llvm.org/D131945
-
Florian Hahn authored
Test cases based on #42332 showing excessive unrolling with both known and runtime trip counts.
-
Arthur Eubanks authored
Currently we treat initializers with init_seg(compiler/lib) as similar to any other init_seg, they simply have a global variable in the proper section (".CRT$XCC" for compiler/".CRT$XCL" for lib) and are added to llvm.used. However, this doesn't match with how LLVM sees normal (or init_seg(user)) initializers via llvm.global_ctors. This causes issues like incorrect init_seg(compiler) vs init_seg(user) ordering due to GlobalOpt evaluating constructors, and the ability to remove init_seg(compiler/lib) initializers at all. Currently we use 'A' for priorities less than 200. Use 200 for init_seg(compiler) (".CRT$XCC") and 400 for init_seg(lib) (".CRT$XCL"), which do not append the priority to the section name. Priorities between 200 and 400 use ".CRT$XCC${Priority}". This allows for some wiggle room for people/future extensions that want to add initializers between compiler and lib. Fixes #56922 Reviewed By: rnk Differential Revision: https://review... -
Fred Tingaud authored
MSVC compatibility mode: fix error on unqualified templated base class initialization in case of partial specialization I introduced a patch to handle unqualified templated base class initialization in MSVC compatibility mode: https://reviews.llvm.org/rGc894e85fc64dd8d83b460de81080fff93c5ca334 We identified a problem with this patch in the case where the base class is partially specialized, which can lead to triggering an assertion in the case of a mix between types and values. The minimal test case is: template <typename Type, int TSize> class Vec {}; template <int TDim> class Index : public Vec<int, TDim> { Index() : Vec() {} }; template class Index<0>; The detailed problem is that I was using the `InjectedClassNameSpecialization`, to which the class template arguments were then applied in order. But in the process, we were losing all the partial specializations of the base class and creating an index mismatch between the expected and passed arguments. Patch By: frederic-tingaud-sonarsource Reviewed By: rnk Differential Revision: https://reviews.llvm.org/D130709
-
Danila Malyutin authored
Fix crash when trying to unconditionally cast alloca type to PointerType Differential Revision: https://reviews.llvm.org/D131146
-
Simon Pilgrim authored
Based off discussion with @spatel for D131838 - InstCombine will still canonicalize the predicates enough that the @use() multiuses aren't helping
-
Steve Merritt authored
Static variables declared within a routine or lexical block should be emitted with a non-qualified name. This allows the variables to be visible to the Visual Studio watch window. Differential Revision: https://reviews.llvm.org/D131400
-
Alexey Bataev authored
Currently, we try to vectorize values, feeding into stores, only if slp-vectorize-hor-store option is provided. We can safely enable vectorization of the value operand of a single store in the basic block, if the operand value is used only in store. It should enable extra vectorization and should not increase compile time significantly. Fixes https://github.com/llvm/llvm-project/issues/51320 Differential Revision: https://reviews.llvm.org/D131894
-
David Spickett authored
One of our silent bots is currently failing: https://lab.llvm.org/staging/#/builders/171/builds/169 With: <...>/Debuginfod.cpp:298:23: error: no type named 'sleep_for' in namespace 'std::this_thread' std::this_thread::sleep_for(Interval); ~~~~~~~~~~~~~~~~~~^ Add missing thread include to that file, which is what all the other users of sleep_for do. I think we are seeing this now because we disabled llvm threading for this builder. Maybe debuginfod should account for that but that's for another time.
-
Louis Dionne authored
Newer SDKs don't even provide libstdc++ headers, so it's effectively never valid to build for libstdc++ unless the user explicitly asks for it (in which case they will need to provide include paths and more). This is a re-application of c5ccb78a which had been reverted in 33171df9 because it broke the Fuchsia CI bots. The issue was that the test was XPASSing because it didn't fail anymore when the CLANG_DEFAULT_CXX_LIB was set to libc++, which seems to be done for Fuchsia. Instead, the test only fails if CLANG_DEFAULT_CXX_LIB is set to libstdc++. As a fly-by fix, also adjust the triple used by various tests to something that is supported. Those tests were shown to fail on internal bots. Differential Revision: https://reviews.llvm.org/D131274
-
Zain Jaffal authored
Precommit tests for D131672. Reviewed By: fhahn Differential Revision: https://reviews.llvm.org/D131757
-
Kevin P. Neal authored
Fix build error: [FPEnv][EarlyCSE] Support for CSE when exception behavior is "ignore" or "maytrap" and the rounding mode is known. This should fix these build bot errors: Step 6 (build-check-mlir-build-only) failure: build (failure) C:\buildbot\mlir-x64-windows-ninja\llvm-project\llvm\lib\Transforms\Scalar\EarlyCSE.cpp(124): error C2220: the following warning is treated as an error C:\buildbot\mlir-x64-windows-ninja\llvm-project\llvm\lib\Transforms\Scalar\EarlyCSE.cpp(124): warning C4996: 'llvm::Optional<llvm::fp::ExceptionBehavior>::getValue': Use value instead. C:\buildbot\mlir-x64-windows-ninja\llvm-project\llvm\lib\Transforms\Scalar\EarlyCSE.cpp(129): warning C4996: 'llvm::Optional<llvm::RoundingMode>::getValue': Use value instead. C:\buildbot\mlir-x64-windows-ninja\llvm-project\llvm\lib\Transforms\Scalar\EarlyCSE.cpp(1386): warning C4996: 'llvm::Optional<llvm::fp::ExceptionBehavior>::getValue': Use value instead. C:\buildbot\mlir-x64-windows-ninja\llvm-project\llvm\lib\Transforms\Scalar\EarlyCSE.cpp(1388): warning C4996: 'llvm::Optional<llvm::RoundingMode>::getValue': Use value instead.
-
YingChi Long authored
Fixes https://github.com/llvm/llvm-project/issues/57151 Reviewed By: aaron.ballman Differential Revision: https://reviews.llvm.org/D131892
-
Kevin P. Neal authored
[FPEnv][EarlyCSE] Support for CSE when exception behavior is "ignore" or "maytrap" and the rounding mode is known. Previously we would only CSE constrained FP intrinsics in the default floating point environment. Exception behavior of "strict" is still not allowed since we are not allowed to remove any traps in that case. There are no restrictions on CSE across function calls inside a function. Differential Revision: https://reviews.llvm.org/D112256
-
Nikita Popov authored
This fixes some fallout from D131282. Currently, add_tablegen() will add the tablegen target to LLVM_EXPORTS and associates the install with LLVMExports. For non-standalone builds, this means that you end up with mlir-tblgen and clang-tblgen in LLVMExports. However, these projects should instead be using MLIR_EXPORTS/MLIRTargets and CLANG_EXPORTS/ClangTargets. To fix this, add an extra EXPORT option and make use of get_target_export_arg() to create the correct export argument. Reviewed By: ashay-github Differential Revision: https://reviews.llvm.org/D131565
-
Karl Meakin authored
Differential Revision: https://reviews.llvm.org/D125504
-
Simon Pilgrim authored
[InstSimplify] Add another and(x,c) case where the mask is redundant (and in fact can constant fold away)
-
Florian Hahn authored
-
Zain Jaffal authored
Currenlty all temporal loads are mapped to `LDP` or `LDR`. This patch will map all the non temporal 256-bit loads into `LDNP`. Future patches should address other non-temporal loads. Reviewed By: fhahn, dmgreen Differential Revision: https://reviews.llvm.org/D131773
-
Clement Courbet authored
Differential Revision: https://reviews.llvm.org/D121365
-
Victor Campos authored
There is an existing mechanism to escape strings, therefore the functions created to escape Tag_also_compatible_with values are not really needed. We can simply use the pre-existing utilities. Reviewed By: pratlucas Differential Revision: https://reviews.llvm.org/D131680
-
Victor Campos authored
The ARM Attribute Parser used to parse the value of also_compatible_with as it is, disregarding the way it is encoded. This patch does a context aware parsing of the also_compatible_with attribute. Additionally, some error handling is also done for incorrect cases. Reviewed By: pratlucas Differential Revision: https://reviews.llvm.org/D130913
-
Bing1 Yu authored
Previously, LegaizeDAG didn't check mask.compress's passthrough might be float, and this lead to getConstant crash since it doesn't support fp Reviewed By: RKSimon Differential Revision: https://reviews.llvm.org/D131947
-
Andre Vieira authored
Differential Revision: https://reviews.llvm.org/D131948
-
Zain Jaffal authored
Reviewed By: fhahn Differential Revision: https://reviews.llvm.org/D131899
-