- May 03, 2022
-
-
Alexey Bataev authored
Currently SLP vectorizer walks through the instructions and selects 3 main classes of values: 1) reduction operations - instructions with same reduction opcode (add, mul, min/max, etc.), which build the reduction, 2) reduced values - instructions with the same opcodes, but different from the reduction opcode, 3) extra arguments - all other values, instructions from the different basic block rather than the root node, instructions with to many/less uses. This scheme is not very efficient. It excludes some instructions and all non-instruction values from the reductions (constants, proficient gathers), to many possibly reduced values are marked as extra arguments. Patch improves this process by introducing a bit extended analysis stage. During this stage, we still try to select 3 classes of the values: 1) reduction operations - same as before, 2) possibly reduced values - all instructions from the current block/non-instructions, which may build a vectorization tree, 3) extra arguments - instructions from the different basic blocks. Additionally, an extra sorting of the possibly reduced values occurs to build the scalar sequences which highly likely will bed vectorized, e.g. loads are grouped by the distance between them, constants are grouped together, cmp instructions are sorted by their compare types and predicates, extractelement instructions are sorted by the vector operand, etc. Also, these groups are reordered by their length so the longest group is the first in the list of the possibly reduced values. The vectorization process tries to emit the reductions for all these groups. These reductions, remaining non-vectorized possible reduced values and extra arguments are then combined into the final expression just like it was before. Differential Revision: https://reviews.llvm.org/D114171
-
Ilya Leoshkevich authored
Clang does not accept instructions like brasl %r0,.-0x100000000, because the second operand's right-hand-side (0x100000000) barely misses the acceptable range. However, since it's being subtracted, it makes sense to perform the range check on the negated value. Reviewed By: uweigand Differential Revision: https://reviews.llvm.org/D124780
-
Sanjay Patel authored
This is the codegen equivalent of D124692. As shown in https://github.com/llvm/llvm-project/issues/55150 - the existing fold may be wrong when converting to a signed value. This is a quick fix to avoid the miscompile. https://alive2.llvm.org/ce/z/KtaDmd Differential Revision: https://reviews.llvm.org/D124771
-
Chris Bieneman authored
This patch begins adding DXContainer parsing support to libObject. Following the pattern used by ELFFile my goal here is to write a standalone DXContainer parser and later write an adapter interface to support a subset of the ObjectFile interfaces so that we can add limited objdump support. I will also be adding ObjectYAML support to help drive testing of the object tools and MC-level object writers as those come together. DXContainer is a slightly odd format. It is arranged in "parts" that are semantically similar to sections, but it doesn't support symbol listing. Reviewed By: MaskRay Differential Revision: https://reviews.llvm.org/D124643
-
Amaury Séchet authored
This reflects the changes in the IR generated by InstCombine as pointed out by @RKSimon in https://reviews.llvm.org/D124743#3485199 Reviewed By: RKSimon Differential Revision: https://reviews.llvm.org/D124756
-
Florian Hahn authored
'Widen' recipe are only used when actual vector values are generated. Fix tryToWidenCall to do not create VPWidenCallRecipes for scalar vector factors. This was exposed by D123720, because the widened recipes are considered vector users. Reviewed By: Ayal Differential Revision: https://reviews.llvm.org/D124718
-
Quentin Colombet authored
Prior to this patch we would only set to undef the unused arguments of the external functions. The rationale was that unused arguments of internal functions wouldn't need to be turned into undef arguments because they should have been simply eliminated by the time we reach that code. This is actually not true because there are plenty of cases where we can't remove unused arguments. For instance, if the internal function is used in an indirect call, it may not be possible to change the function signature. Yet, for statically known call-sites we would still like to mark the unused arguments as undef. This patch enables the "set undef arguments" optimization on internal functions when we encounter cases where internal functions cannot be optimized. I.e., whenever an internal function is marked "live". Differential Revision: https://reviews.llvm.org/D124699
-
Erich Keane authored
This reverts commit a9789910. The patch caused some problems with the libc++ `__range_adaptor_closure` that I haven't been able to figure out the cause of, so I am reverting while I figure out whether this is a solvable problem/issue with the CFE, or libc++ depending on an older 'incorrect' behavior.
-
Paul Robinson authored
-
Paul Robinson authored
It looks like there used to be a test for this, but the test evolved in a way that caused the check for the diagnostic to be eliminated. Add a test that is obviously and specifically for that diagnostic.
-
Fangrui Song authored
The majority of tests omit testing "clang" for -cc1 command lines. In addition, some distributions symlink %clang to an executable with a content hash based filename so clang{{.*}} check won't work. With this change, we can remove many -no-canonical-prefixes whose purpose was to make the tests pass on such distributions. -
Alex Brachet authored
Now output elf files will also have excluded symbols removed. Reviewed By: haowei Differential Revision: https://reviews.llvm.org/D124781
-
Jonas Paulsson authored
libcalls." (was 0f8c6267). This reverts commit 14d93907. The patch previously failed to recognize cases where user had defined a function alias with an identical name as that of the library function. Module::getFunction() would then return nullptr which is what the sanitizer discovered. In this updated version a new function isLibFuncEmittable() has as well been introduced which is now used instead of TLI->has() anytime a library function is to be emitted . It additionally also makes sure there is e.g. no function alias with the same name in the module. Reviewed By: Eli Friedman Differential Revision: https://reviews.llvm.org/D123198
-
Raghu Maddhipatla authored
Reviewed By: kiranchandramohan, peixin, shraiysh Differential Revision: https://reviews.llvm.org/D123828
-
Eugene Zhulenev authored
When CRunnerUtils included together with MLIR IR headers, it can lead to compilation errors. Reviewed By: mehdi_amini Differential Revision: https://reviews.llvm.org/D124744
-
Harald van Dijk authored
The Itanium C++ ABI says prefixes are substitutable. For most prefixes we already handle this: the manglePrefix(const DeclContext *, bool) and manglePrefix(QualType) overloads explicitly handles substitutions or defer to functions that handle substitutions on their behalf. The manglePrefix(NestedNameSpecifier *) overload, however, is different and handles some cases implicitly, but not all. The Identifier case was not handled; this change adds handling for it, as well as a test case. Reviewed By: erichkeane Differential Revision: https://reviews.llvm.org/D122663
-
Amy Kwan authored
This patch turns on support for CR bit accesses for Power8 and above. The reason why CR bits are turned on as the default for Power8 and above is that because later architectures make use of builtins and instructions that require CR bit accesses (such as the use of setbc in the vector string isolate predicate and bcd builtins on Power10). This patch also adds the clang portion to allow for turning on CR bits in the front end if the user so desires to. Differential Revision: https://reviews.llvm.org/D124060
-
Fangrui Song authored
-
Arthur Eubanks authored
If there are pre-existing dead instructions, the order we visit replaced values can cause us sometimes to not delete dead instructions. The added test non-deterministically failed without the change.
-
Fangrui Song authored
To make them meaningful, it's useful to check "clang". Use -no-canonical-prefixes to support distributions that symlink %clang to an executable with a filename not ending in "clang".
-
- May 02, 2022
-
-
Nikita Popov authored
Normally the index type will already be canonicalized here, but this is not guaranteed depending on visitation order. The code was already accounting for a potentially needed sext, but a trunc may also be needed. Add a ConstantExpr::getSExtOrTrunc() helper method to make this simpler. This matches the corresponding IRBuilder method in behavior. Fixes https://github.com/llvm/llvm-project/issues/55228.
-
LLVM GN Syncbot authored
-
Marco Antognini authored
Remove unnecessary conversion to Optional<> and incorrect assumption that BindExpr can return a null state. Reviewed By: steakhal Differential Revision: https://reviews.llvm.org/D124681
-
Walter Erquinigo authored
[trace][intelpt] Support system-wide tracing [1] - Add a method for accessing the list of logical core ids In order to open perf events per core, we need to first get the list of core ids available in the system. So I'm adding a function that does that by parsing /proc/cpuinfo. That seems to be the simplest and most portable way to do that. Besides that, I made a few refactors and renames to reflect better that the cpu info that we use in lldb-server comes from procfs. Differential Revision: https://reviews.llvm.org/D124573
-
Simon Pilgrim authored
znver2 is a mainly a search+replace of the znver1 model, but for no reason the HADD and DPPS have been moved around - try to keep these in sync (no actual changes in the models).
-
Simon Pilgrim authored
This leads to null pointer dereference warnings - use cast<> which will assert that the cast correct.
-
Marco Antognini authored
Ensure the definition is in the "taint" namespace, like its declaration. Reviewed By: steakhal Differential Revision: https://reviews.llvm.org/D124462
-
Augie Fackler authored
Differential Revision: https://reviews.llvm.org/D123086
-
Erich Keane authored
This reverts commit 0c31da48. I've solved the issue with the PointerUnion by making the `FunctionTemplateDecl` pointer be a NamedDecl, that could be a `FunctionDecl` or `FunctionTemplateDecl` depending. This is enforced with an assert.
-
David Green authored
-
Augie Fackler authored
Differential Revision: https://reviews.llvm.org/D123084
-
Simon Pilgrim authored
D124741 added the generic "__builtin_reduce_add" which we can use to replace the x86 specific integer add reduction builtins - internally these were mapping to the same intrinsic already so there are no test changes required. Differential Revision: https://reviews.llvm.org/D124757
-
Erich Keane authored
This reverts commit 4b6c2cd6. The patch caused numerous ARM 32 bit build failures, since we added a 5th item to the PointerUnion, and went over the 2-bits available in the 32 bit pointers.
-
Nikita Popov authored
-
Sanjay Patel authored
Copied from x86 tests for multi-target coverage. Also, provides coverage for target-specific asm testing for Alive2 or its follow-ons. See #55150 and D124692
-
Sanjay Patel authored
Adapted from tests for IR in D124692. Also see #55150
-
Sanjay Patel authored
Also, improve test names.
-
Erich Keane authored
As reported here: https://github.com/llvm/llvm-project/issues/44178 Concepts are not supposed to be instantiated until they are checked, so this patch implements that and goes through significant amounts of work to make sure we properly re-instantiate the concepts correctly. Differential Revision: https://reviews.llvm.org/D119544
-
Ulrich Weigand authored
Add support for the SystemZ (s390x) architecture to libunwind. Support should be feature-complete with the exception of unwinding from signal handlers (to be added later). Reviewed by: MaskRay Differential Revision: https://reviews.llvm.org/D124248
-
Simon Pilgrim authored
Fixes an old TODO - confirmed on Agner + uops.info
-