- Jun 28, 2023
-
-
Mike Crowe authored
The initial implementation of the modernize-use-std-print check was capable of converting calls to printf (etc.) which used the return value to calls to std::print which has no return value, thus breaking the code. Use code inspired by the implementation of bugprone-unused-return-value check to ignore cases where the return value is used. Add appropriate lit test cases and documentation. Reviewed By: PiotrZSL Differential Revision: https://reviews.llvm.org/D153860
-
Simon Pilgrim authored
[X86] Add getBitSelect helper function to create OR(AND(LHS,MASK),AND(RHS,~MASK)) bit select patterns. NFC.
-
Simon Pilgrim authored
Prefer XOR to ANDNP as its commutative
-
LLVM GN Syncbot authored
-
Yitzhak Mandelbaum authored
Adds support for the classic dataflow algorithm that partitions a flow graph into distinct intervals. C.f. Dragon book, pp. 664-666. A version of this algorithm exists in LLVM (see llvm/Analysis/Interval.h and related files), but it is specific to LLVM, is a recursive (vs iterative) algorithm, and uses many layers of abstraction that seem unnecessary for CFG purposes. This patch is part 1 of 2. The next patch will generalize the code to work on intervals, to support computation of the limit flow graph. Differential Revision: https://reviews.llvm.org/D152263
-
Jake Egan authored
/scratch/powerllvm/powerllvm_env/aix-ppc64/clang-ppc64-aix/llvm-project/llvm/unittests/tools/llvm-exegesis/X86/TargetTest.cpp:88:17: error: unused function 'IsMovRegToReg' [-Werror,-Wunused-function] Matcher<MCInst> IsMovRegToReg(unsigned Opcode, int64_t Reg1, int64_t Reg2) { 1 error generated. -
Craig Topper authored
Make Zcf/Zcd depend on Zca. Reviewed By: asb Differential Revision: https://reviews.llvm.org/D153826
-
Craig Topper authored
Bit 6 should be 0. Reviewed By: asb Differential Revision: https://reviews.llvm.org/D153793
-
Florian Hahn authored
For more details about the nomination, please see https://discourse.llvm.org/t/rfc-proposing-changes-to-the-code-owner-for-the-llvm-vectorizers/70267/9
-
Mark de Wever authored
This was broken in D145628; it caused the new header not to be displayed as a header at all and show part of the markup as text.
-
Craig Topper authored
-
Amy Kwan authored
This patch is a follow up to D43315, and adds the following new load/store TLS specific instructions for integer and floating point scalar types: ``` LHAXTLS LWAXTLS LHAXTLS_32 LWAXTLS_32 LFSXTLS LFDXTLS STFSXTLS STFDXTLS ``` These instructions can be used to optimized TLS sequences when D-Form loads/stores follow an ADD_TLS instruction. Duplicate versions of these instructions are also added within an isAsmParserOnly=1 block (similar to D47382) to allow llvm-mc to assemble these instructions. Differential Revision: https://reviews.llvm.org/D153645
-
Arthur Eubanks authored
Use Value::getPointerDereferenceableBytes() instead of hardcoding dereferenceable only for allocas. Allows us to infer inbounds GEPs for other Values like CallInsts and Arguments. Fixed clang test broken in initial land. Reviewed By: nikic Differential Revision: https://reviews.llvm.org/D153815
-
Florian Hahn authored
This patch updates ConstraintElimination to track uses of conditions in the worklist. This allows simplifying conditions using the context that holds directly at the condition, instead of where the condition is defined. This allows us to catch more cases in practice: there are multiple code-size changes for CTMark while compile-time remains unchanged: https://llvm-compile-time-tracker.com/compare.php?from=4b020cca9363bebab4643f89cfa92ab2fcc7976c&to=7a6e84b8f029713c137814cd46eec775d24a54a1&stat=instructions:u This should help to simplify D151799. Reviewed By: nikic Differential Revision: https://reviews.llvm.org/D153660
-
Arthur Eubanks authored
This reverts commit cd43b19c. Breaks clang/test/CodeGenOpenCL/builtins-amdgcn.cl.
-
Alex Richardson authored
These conversion functions were using LDBL_MANT_DIG (which is the 80-bit extended float on x86) instead of the appropriate macro for the 128-bit floating point type expected by the *tf* softfloat library calls. This was discovered while testing D98261 (which allows building the *tf* functions on x86). This also changes the constants used in the two tests to use 128-bit floating-point literals instead of long double ones to ensure that the comparison succeeds on platforms with smaller long double (e.g. x86_64) Reviewed By: scanon Differential Revision: https://reviews.llvm.org/D131787
-
Stephen Tozer authored
This reverts commit 2325e011. Reverted due to buildbot failure: llvm-clang-x86_64-expensive-checks-debian
-
Arthur Eubanks authored
Use Value::getPointerDereferenceableBytes() instead of hardcoding dereferenceable only for allocas. Allows us to infer inbounds GEPs for other Values like CallInsts and Arguments. Reviewed By: nikic Differential Revision: https://reviews.llvm.org/D153815
-
Arthur Eubanks authored
-
Philip Reames authored
This is a follow on to D152740. The focus of this patch is on actually removing the old TA (unsuffixed) version. I realized we already had plumbing for combined TA/TU pseudos - used by some of the ternary instructions. As such, we can go ahead and fully remove the old TA, and rename the _TU variant to be unsuffixed. (The rename must happen in this patch for the table structure to work out as expected.) The scheduling difference comes from an omission in D152740. If we selected a _MASK variant - either from manual ISEL or instrincs - we were going through doPeepholeMaskedRVV and still getting the TA variant. The use of the IsCombined flag in the MaskedPseudo table causes us to use the TU (now unsuffixed) variant instead. Differential Revision: https://reviews.llvm.org/D153155
-
- Jun 27, 2023
-
-
LLVM GN Syncbot authored
-
Simon Tatham authored
An .ARM.attributes section is divided into subsections, each labelled with a vendor name. There is one standardised vendor name, which must be used for all attributes that affect compatibility. Subsections labelled with other vendor names can be used for optimisation purposes, but it has to be safe for an object file consumer to ignore them if it doesn't recognise the vendor name. LLD currently terminates parsing of the whole attributes section as soon as it encounters a subsection with a vendor name it doesn't recognise (which is anything other than the standard one). This can prevent it from detecting compatibility issues, if a standard subsection followed the vendor-specific one. This patch modifies the attribute parser so that unrecognised vendor subsections are silently skipped, and the subsections beyond them are still processed. (Relanded with no change from the original commit 8f208edd. I reverted it in 949bb7e4 due to widespread buildbot breakage, failing to notice that 975f71fa had already fixed the failing unit test. Also, the *revert* caused at least one buildbot to fail, because I switched the affected lld test to making %t a directory, and then the reverted version tried to treat it as a file without cleaning the output directory first.) Differential Revision: https://reviews.llvm.org/D153335
-
Takuya Shimizu authored
This patch makes the display of member function calls more true to the user-written code by making use of the syntactical structure of the function calls. This patch also changes the display of conventional value-based printing from arrow operator to dot operator. This avoids the syntactical invalidness in notes previously caused by the display of & operator (lack of parentheses and reference of rvalue) Fixes https://github.com/llvm/llvm-project/issues/57081 Reviewed By: cjdb Differential Revision: https://reviews.llvm.org/D151720
-
Igor Kirillov authored
Add a missing check that ensures that ComplexDeinterleaving for reduction is only analyzed for Real and Imaginary Instructions of the same type. Differential Revision: https://reviews.llvm.org/D153862
-
Youngsuk Kim authored
Partial progress towards replacing `CreateElementBitCast`, as it no longer does what its name suggests. Either replace its uses with `Address::withElementType()`, or remove them if no longer needed. Reviewed By: barannikov88, nikic Differential Revision: https://reviews.llvm.org/D153314
-
Jeremy Morse authored
X86's CMOV conversion transforms CMOV instructions into control flow between blocks, meaning the value is computed by a PHI rather than a "real" machine instruction. In instruction-referencing mode, we need to transfer the instruction label between the old CMOV and the new PHI instruction to mark where the variable value is computed. There's an extra complication in that memory operands can be unfolded from the CMOV and sunk into the new blocks -- the test checks both scenarios where the instruction number has to hop between instructions. This omission exposed by Dexter testing. Reviewed By: Orlando Differential Revision: https://reviews.llvm.org/D145565
-
Elliot Goodrich authored
Move `AttributeMask` out of `llvm/IR/Attributes.h` to a new file `llvm/IR/AttributeMask.h`. After doing this we can remove the `#include <bitset>` and `#include <set>` directives from `Attributes.h`. Since there are many headers including `Attributes.h`, but not needing the definition of `AttributeMask`, this causes unnecessary bloating of the translation units and slows down compilation. This commit adds in the include directive for `llvm/IR/AttributeMask.h` to the handful of source files that need to see the definition. This reduces the total number of preprocessing tokens across the LLVM source files in lib from (roughly) 1,917,509,187 to 1,902,982,273 - a reduction of ~0.76%. This should result in a small improvement in compilation time. Differential Revision: https://reviews.llvm.org/D153728
-
Joseph Huber authored
This patch changes the handling of OpenMP to add the device attributes to the canonical definitions when we encounter a non-canonical definition. Previously, the following code would not work because it would find the non-canonical definition first which would then not be used anywhere else. ``` int x; extern int x; ``` This patch now adds the attribute to both of them. This allows us to perform the following operation if, for example, there were an implementation of `stderr` on the device. ``` #include <stdio.h> // List of libc symbols supported on the device. extern FILE *stderr; ``` Unfortunately I cannot think of an equivalent solution to HIP / CUDA device declarations as those are done with simple attributes. Attributes themselves cannot be used to affect a definition once its canonical definition has already been seen. Some help on that front would be appreciated. Fixes https://github.com/llvm/llvm-project/issues/63355 Reviewed By: ABataev Differential Revision: https://reviews.llvm.org/D153369
-
David Spickett authored
This reverts commit cc0fc358 due to a failure reported on MacOS.
-
Ties Stuij authored
The CPSR registers ops of the instructions constructed in ExpandTMOV32BitImm were marked as kill, instead of define. Best to use the pre-existing t1CondCodeOp fn to construct CPSRs. Reviewed By: simonwallis2 Differential Revision: https://reviews.llvm.org/D153763
-
Louis Dionne authored
Differential Revision: https://reviews.llvm.org/D153807
-
Simon Pilgrim authored
Add X86ISD::ANDNP handling to targetShrinkDemandedConstant as well, which allows us to replace a lot of truncated masks with (rematerializable) allones values
-
Simon Tatham authored
This reverts commit 8f208edd. I completely missed the compiled unit test for ELFAttributeParser, which also needs updating. I'll reland this change once I make further fixes.
-
Nikita Popov authored
The way this is currently implemented the accumulated offsets can end up having a different size, which causes unnecessary complication for further extension of the code. Don't strip pointer casts at the start and rely on stripAndAccumulate to do any necessary stripping. It gracefully handles different index sizes and will always retain the width of the original pointer index type. This is not NFC, but unlikely to make any practical difference.
-
Haojian Wu authored
Revert "[llvm-profdata] Refactoring Sample Profile Reader to increase FDO build speed using MD5 as key to Sample Profile map" This reverts commit 12e9c7aa. The commit has broken the buildbot, see comment https://reviews.llvm.org/D147740#4451540
-
Louis Dionne authored
Since LIBCXX_ENABLE_FILESYSTEM now truly represents whether the platform supports a filesystem (as opposed to whether the <filesystem> library is provided), we can provide a few additional classes from the <filesystem> library even when the platform does not have support for a filesystem. For example, this allows performing path manipulations using std::filesystem::path even on platforms where there is no actual filesystem. rdar://107061236 Differential Revision: https://reviews.llvm.org/D152382
-
Matthias Springer authored
Copy back the padded result to the original destination of the computation. This is important for bufferization, to ensure that the result of the computation does not suddenly materialize in a different buffer due to padding. A `bufferization.copy_tensor` is inserted for every (unpadded) result. Such ops bufferize to memcpys, but they fold away, should the padding fold away. Differential Revision: https://reviews.llvm.org/D153554
-
Matthias Springer authored
This operation is a "copy" operation on tensors. It is guaranteed to bufferize to a memcpy. This is different from "tensor.insert_slice", which may fold away. Note: There is a symmetry between certain tensor, bufferization and memref ops: * `tensor.empty`, `bufferization.alloc_tensor`, `memref.alloc` * (none), `bufferization.dealloc_tensor`, `memref.dealloc` * `tensor.insert_slice`, `bufferization.copy_tensor`, `memref.copy` Tensor ops can generally canonicalize/fold away, while bufferization dialect ops can be used when a certain side effect is expected to materialize; so they do not fold away. Differential Revision: https://reviews.llvm.org/D153552
-
Matthias Springer authored
Add an additional result handle to the op. This new handle is mapped to the newly allocated buffer. Differential Revision: https://reviews.llvm.org/D153514
-
Matthias Springer authored
* Use LinalgPaddingOptions instead of passing many parameters. * Split function into two parts. Differential Revision: https://reviews.llvm.org/D153853
-