- Jan 12, 2021
-
-
Hubert Tong authored
Add tests with bad message text for `-Wpointer-sign` and run them with both signed and unsigned versions of plain `char`.
-
Evandro Menezes authored
Define the `vfclass` IR intrinsics for the respective V instructions. Authored-by:
Roger Ferrer Ibanez <rofirrim@gmail.com> Co-Authored-by:
Evandro Menezes <evandro.menezes@sifive.com> Differential Revision: https://reviews.llvm.org/D94356
-
Duncan P. N. Exon Smith authored
The standard requires comparisons of pointers to unrelated storage to use `std::less`. Split out some helpers that do that and update all the code that was comparing using `<` and friends (mostly assertions). Differential Revision: https://reviews.llvm.org/D93777
-
Roman Lebedev authored
This boils down to how we deal with early-increment iterator over function's basic blocks: not only we need to early-increment, after that we also need to skip all the blocks that are scheduled for removal, as per DomTreeUpdater.
-
Roman Lebedev authored
Thus supporting lazy DomTreeUpdater mode, where the domtree updates (and thus block removals) aren't applied immediately, but are delayed until last possible moment.
-
Roman Lebedev authored
When DomTreeUpdater is in lazy update mode, the blocks that were scheduled to be removed, won't be removed until the updates are flushed, e.g. by asking DomTreeUpdater for a up-to-date DomTree. From the function's current code, it is pretty evident that the support for the lazy mode is an afterthought, see e.g. how we roll-back NumRemoved statistic.. So instead of considering all the unreachable blocks as the blocks-to-be-removed, simply additionally skip all the blocks that are already scheduled to be removed
-
Roman Lebedev authored
[SimplifyCFG] FoldValueComparisonIntoPredecessors(): don't insert a DomTree edge if it already exists When we are adding edges to the terminator and potentially turning it into a switch (if it wasn't already), it is possible that the case we're adding will share it's destination with one of the preexisting cases, in which case there is no domtree edge to add. Indeed, this change does not have a test coverage change. This failure has been exposed in an existing test coverage by a follow-up patch that switches to lazy domtreeupdater mode, and removes domtree verification from SimplifyCFGOpt::simplifyOnce()/SimplifyCFGOpt::run(), IOW it does not appear feasible to add dedicated test coverage here.
-
Roman Lebedev authored
BB was already always branching to EdgeBB, there is no edge to add. Indeed, this change does not have a test coverage change. This failure has been exposed in an existing test coverage by a follow-up patch that switches to lazy domtreeupdater mode, and removes domtree verification from SimplifyCFGOpt::simplifyOnce()/SimplifyCFGOpt::run(), IOW it does not appear feasible to add dedicated test coverage here.
-
Roman Lebedev authored
SI is the terminator of BB, so the edge we are adding obviously already existed. Indeed, this change does not have a test coverage change. This failure has been exposed in an existing test coverage by a follow-up patch that switches to lazy domtreeupdater mode, and removes domtree verification from SimplifyCFGOpt::simplifyOnce()/SimplifyCFGOpt::run(), IOW it does not appear feasible to add dedicated test coverage here.
-
Craig Topper authored
This matches what we use for integer 0. It's also consistent with the scalar 'mv' pseudo that uses addi rather than add with x0.
-
Richard Uhler authored
Based on the comments in lib/Parser/TypeParser.cpp on the parseMemRefType and parseTensorType functions. Reviewed By: mehdi_amini Differential Revision: https://reviews.llvm.org/D94262
-
Nathan Chancellor authored
When building a 64-bit big endian PowerPC Linux kernel with a 64-bit little endian PowerPC target, the 32-bit vDSO errors: ``` $ make ARCH=powerpc CC=clang CROSS_COMPILE=powerpc64le-linux-gnu- \ pseries_defconfig arch/powerpc/kernel/vdso32/ ld.lld: error: arch/powerpc/kernel/vdso32/sigtramp.o is incompatible with elf32-powerpc ld.lld: error: arch/powerpc/kernel/vdso32/gettimeofday.o is incompatible with elf32-powerpc ld.lld: error: arch/powerpc/kernel/vdso32/datapage.o is incompatible with elf32-powerpc ld.lld: error: arch/powerpc/kernel/vdso32/cacheflush.o is incompatible with elf32-powerpc ld.lld: error: arch/powerpc/kernel/vdso32/note.o is incompatible with elf32-powerpc ld.lld: error: arch/powerpc/kernel/vdso32/getcpu.o is incompatible with elf32-powerpc ld.lld: error: arch/powerpc/kernel/vdso32/vgettimeofday.o is incompatible with elf32-powerpc ... ``` This happens because the endian information is missing from the call to the assembler, even though it was explicitly passed to clang. See the below example. ``` $ echo | clang --target=powerpc64le-linux-gnu \ --prefix=/usr/bin/powerpc64le-linux-gnu- \ -no-integrated-as -m32 -mbig-endian -### -x c -c - ".../clang-12" "-cc1" "-triple" "powerpc-unknown-linux-gnu" ... ... "/usr/bin/powerpc64le-linux-gnu-as" "-a32" "-mppc" "-many" "-o" "-.o" "/tmp/--e69e28.s" ``` clang sets the right target with -m32 and -mbig-endian but -mbig-endian does not make it to the assembler, resulting in a 32-bit little endian binary. This differs from the little endian targets, which always pass -mlittle-endian. ``` $ echo | clang --target=powerpc64-linux-gnu \ --prefix=/usr/bin/powerpc64-linux-gnu- \ -no-integrated-as -m32 -mlittle-endian -### -x c -c - ".../clang-12" "-cc1" "-triple" "powerpcle-unknown-linux-gnu" ... ... "/usr/bin/powerpc64-linux-gnu-as" "-a32" "-mppc" "-mlittle-endian" "-many" "-o" "-.o" "/tmp/--405dbd.s" ``` Do the same thing for the big endian targets so that there is no more error. This matches GCC's behavior, where -mbig and -mlittle are always passed along to GNU as. ``` $ echo | powerpc64-linux-gcc -### -x c -c - ... .../powerpc64-linux/bin/as -a64 -mpower4 -many -mbig -o -.o /tmp/ccVn7NAm.s ... $ echo | powerpc64le-linux-gcc -### -x c -c - ... .../powerpc64le-linux/bin/as -a64 -mpower8 -many -mlittle -o -.o /tmp/ccPN9ato.s ... ``` Reviewed By: nickdesaulniers, MaskRay Differential Revision: https://reviews.llvm.org/D94442 -
Fraser Cormack authored
Reviewed By: craig.topper Differential Revision: https://reviews.llvm.org/D94294
-
Shilei Tian authored
For now `elf_common.c` is taken as a common part included into different plugin implementations directly via `#include "../../common/elf_common.c"`, which is not a best practice. Since it is simple enough such that we don't need to create a real library for it, we just take it as a interface library so that other targets can link it directly. Another advantage of this method is, we don't need to add the folder into header search path which can potentially pollute the search path. VE and AMD platforms have not been tested because I don't have target machines. Reviewed By: JonChesterfield Differential Revision: https://reviews.llvm.org/D94443
-
Hongtao Yu authored
Functions that are renamed under -funique-internal-linkage-names have their debug linkage name updated as well. Reviewed By: dblaikie Differential Revision: https://reviews.llvm.org/D93747
-
Fangrui Song authored
-
Nikita Popov authored
-
Nikita Popov authored
Test the case where one part of and/or is an icmp, while the other one is an arbitrary value.
-
Aart Bik authored
This ensures the memref base + indices expression is well-formed Reviewed By: ThomasRaoux, ftynse Differential Revision: https://reviews.llvm.org/D94441
-
Fraser Cormack authored
Original patch by @rogfer01. This patch adds ISel patterns for the above operations to the corresponding vector/vector and vector/scalar RVV instructions, as well as extra patterns to match operand-swapped scalar/vector vfrsub and vfrdiv. Authored-by:
Roger Ferrer Ibanez <rofirrim@gmail.com> Co-Authored-by:
Fraser Cormack <fraser@codeplay.com> Reviewed By: craig.topper Differential Revision: https://reviews.llvm.org/D94408
-
Fangrui Song authored
-
Richard Smith authored
literals. A literal interpretation of the standard wording allows this, but it was never intended that string literal operator templates would be used for anything other than user-defined string literals.
-
Siva Chandra Reddy authored
It was previously a generated header. It can easily converted to a generated header if required in future. Reviewed By: michaelrj Differential Revision: https://reviews.llvm.org/D94445
-
Bjorn Pettersson authored
Before this patch there was generic mapping from vector_extract to G_EXTRACT_VECTOR_ELT added in SelectionDAGCompat.td. That mapping is now replaced by a mapping from extractelt instead. The reasoning is that vector_extract is marked as deprecated, so it is assumed that a majority of targets will use extractelt and not vector_extract (and that the long term solution for all targets would be to use extractelt). Targets like AArch64 that still use vector_extract can add an additional mapping from the deprecated vector_extract as target specific tablegen definitions. Such a mapping is added for AArch64 in this patch to avoid breaking tests. When adding the extractelt => G_EXTRACT_VECTOR_ELT mapping we triggered some new code paths in GlobalISelEmitter, ending up in an assert when trying to import a pattern containing EXTRACT_SUBREG for ARM. Therefore this patch also adds a "failedImport" warning for that situation (instead of hitting the assert). Differential Revision: https://reviews.llvm.org/D93416
-
Sanjay Patel authored
This is a more basic pattern that we should handle before trying to solve: https://llvm.org/PR48640 There might be a better way to think about this because the pre-condition that I came up with (number of sign bits in the compare constant) misses a potential transform for each of ugt and ult as commented on in the test file. Tried to model this is in Alive: https://rise4fun.com/Alive/juX1 ...but I couldn't get the ComputeNumSignBits() pre-condition to work as expected, so replaced with leading 0/1 preconditions instead. Name: ugt Pre: countLeadingZeros(C2) <= C1 && countLeadingOnes(C2) <= C1 %a = ashr %x, C1 %r = icmp ugt i8 %a, C2 => %r = icmp slt i8 %x, 0 Name: ult Pre: countLeadingZeros(C2) <= C1 && countLeadingOnes(C2) <= C1 %a = ashr %x, C1 %r = icmp ult i4 %a, C2 => %r = icmp sgt i4 %x, -1 Also approximated in Alive2: https://alive2.llvm.org/ce/z/u5hCcz https://alive2.llvm.org/ce/z/__szVL Differential Revision: https://reviews.llvm.org/D94014
-
Mehdi Amini authored
This reverts commit df86f15f. The gcc-5 build was broken by this change: mlir/tools/mlir-linalg-ods-gen/mlir-linalg-ods-gen.cpp:1275:77: required from here /usr/include/c++/5/ext/new_allocator.h:120:4: error: no matching function for call to 'std::pair<const std::__cxx11::basic_string<char>, {anonymous}::TCParser::RegisteredAttr>::pair(llvm::StringRef&, {anonymous}::TCParser::RegisteredAttr'
-
Stella Laurenzo authored
* Registers a small set of sample dialects. * NFC with respect to existing C-API symbols but some headers have been moved down a level to the Dialect/ sub-directory. * Adds an additional entry point per dialect that is needed for dynamic discovery/loading. * See discussion: https://llvm.discourse.group/t/dialects-and-the-c-api/2306/16 Differential Revision: https://reviews.llvm.org/D94370
-
Stella Laurenzo authored
* We've got significant missing features in order to use most of these effectively (i.e. custom builders, region-based builders). * We presently also lack a mechanism for actually registering these dialects but they can be use with contexts that allow unregistered dialects for further prototyping. Differential Revision: https://reviews.llvm.org/D94368
-
Thomas Raoux authored
Differential Revision: https://reviews.llvm.org/D94434
-
Mircea Trofin authored
This patch finishes addressing unused prefixes under CodeGen: 2 remaining tests fixed, and then undo-ing the lit.local.cfg changes under various subdirs and moving the policy under CodeGen. Differential Revision: https://reviews.llvm.org/D94430
-
Abhina Sreeskantharajan authored
This is a continuation of https://reviews.llvm.org/D67696. The following tools also need to set the OF_Text flag correctly. - llvm-profdata - llvm-link Reviewed By: rnk Differential Revision: https://reviews.llvm.org/D94313
-
Nathan James authored
Works like std::make_unique but for IntrusiveRefCntPtr objects. See https://lists.llvm.org/pipermail/llvm-dev/2021-January/147729.html Reviewed By: dblaikie, MaskRay Differential Revision: https://reviews.llvm.org/D94440
-
River Riddle authored
The type tablegen backend now has enough support to represent these types well enough, so we can now move them to be declaratively defined. Differential Revision: https://reviews.llvm.org/D94275
-
River Riddle authored
This allows for specifying additional get/getChecked methods that should be generated on the type, and acts similarly to how OpBuilders work. TypeBuilders have two additional components though: * InferredContextParam - Bit indicating that the context parameter of a get method is inferred from one of the builder parameters * checkedBody - A code block representing the body of the equivalent getChecked method. Differential Revision: https://reviews.llvm.org/D94274
-
River Riddle authored
This removes the need for OpDefinitionsGen to use raw tablegen API, and will also simplify adding builders to TypeDefs as well. Differential Revision: https://reviews.llvm.org/D94273
-
Tony Tye authored
Reorder the AMDGPUUage description of the memory model code sequences for volatile so clear that it applies independent of the nontemporal setting. Differential Revision: https://reviews.llvm.org/D94358
-
Marek Kurdej authored
This adds `// clang-format off` in the auto-generated file to avoid lint warnings. Reviewed By: ldionne, #libc Differential Revision: https://reviews.llvm.org/D94410
-
Fraser Cormack authored
Original patch by @rogfer01. All ordered comparisons except ONE are supported natively, and all unordered comparisons except UNE are expanded into sequences involving explicit NaN checks and mask arithmetic. Additionally, we expand GT,OGT,GE,OGE to their swapped-operand versions, and pattern-match those back to the "original", swapping operands once more. This way we catch both operations and both "vf" and "fv" forms with fewer patterns. Also add support for floating-point splat_vector, with an optimization for splatting fpimm0. Authored-by:
Roger Ferrer Ibanez <rofirrim@gmail.com> Co-Authored-by:
Fraser Cormack <fraser@codeplay.com> Reviewed By: craig.topper Differential Revision: https://reviews.llvm.org/D94242
-
Christian Sigg authored
Lowering of async dialect uses a fixed type converter and therefore does not support lowering non-standard types. This revision adds a structural conversion so that non-standard types in `!async.value`s can be lowered to LLVM before lowering the async dialect itself. Reviewed By: ezhulenev Differential Revision: https://reviews.llvm.org/D94404
-
Abhina Sreeskantharajan authored
On z/OS, the error message "EDC5111I Permission denied." is not matched correctly in lit tests. This patch updates the check expression to match successfully. Reviewed By: fanbo-meng Differential Revision: https://reviews.llvm.org/D94432
-