- Oct 14, 2021
-
-
Julien Pages authored
Differential Revision: https://reviews.llvm.org/D111652
-
Gabor Marton authored
The solver's symbol simplification mechanism was not able to handle cases when a symbol is simplified to a concrete integer. This patch adds the capability. E.g., in the attached lit test case, the original symbol is `c + 1` and it has a `[0, 0]` range associated with it. Then, a new condition `c == 0` is assumed, so a new range constraint `[0, 0]` comes in for `c` and simplification kicks in. `c + 1` becomes `0 + 1`, but the associated range is `[0, 0]`, so now we are able to realize the contradiction. Differential Revision: https://reviews.llvm.org/D110913
-
Mark de Wever authored
-
Dave Lee authored
-
Nicolas Vasilache authored
I am unclear this is reproducible with correct IR but atm the verifier for InsertSliceOp is not powerful enough and this triggers an infinite loop that is worth fixing independently. Differential Revision: https://reviews.llvm.org/D111812
-
Nicolas Vasilache authored
-
luxufan authored
This patch add a TableManager which reponsible for fixing edges that need entries to reference the target symbol and constructing such entries. In the past, the PerGraphGOTAndPLTStubsBuilder pass was used to build GOT and PLT entry, and the PerGraphTLSInfoEntryBuilder pass was used to build TLSInfo entry. By generalizing the behavior of building entry, I added a TableManager which could be reused when built GOT, PLT and TLSInfo entries. If this patch makes sense and can be accepted, I will apply the TableManager to other targets(MachO_x86_64, MachO_arm64, ELF_riscv), and delete the file PerGraphGOTAndPLTStubsBuilder.h Reviewed By: lhames Differential Revision: https://reviews.llvm.org/D110383
-
Jinsong Ji authored
We are running `ls -lh` in gcov-execlp.c test in Posix folder. However `-h` is not a POSIX option,ls on some POSIX system (eg: AIX) may not support it. This patch remove this option to avoid break. Reviewed By: anhtuyen Differential Revision: https://reviews.llvm.org/D111807
-
Ben Shi authored
Reviewed By: craig.topper, luismarques Differential Revision: https://reviews.llvm.org/D111116
-
Tobias Gysi authored
Reviewed By: nicolasvasilache Differential Revision: https://reviews.llvm.org/D111798
-
Jeremy Morse authored
This patch is very similar to D110173 / a3936a6c, but for variable values rather than machine values. This is for the second instr-ref problem, calculating the correct variable value on entry to each block. The previous lattice based implementation was broken; we now use LLVMs existing PHI placement utilities to work out where values need to merge, then eliminate un-necessary ones through value propagation. Most of the deletions here happen in vlocJoin: it was trying to pick a location for PHIs to happen in, badly, leading to an infinite loop in the MIR test added, where it would repeatedly switch between register locations. The new approach is simpler: either PHIs can be eliminated, or they can't, and the location of the value is a different problem. Various bits and pieces move to the header so that they can be tested in the unit tests. The DbgValue class grows a "VPHI" kind to represent variable value PHIS that haven't been eliminated yet. Differential Revision: https://reviews.llvm.org/D110630
-
Brian Cain authored
This commit adds the system reg/regpair definitions and the corresponding register transfer instructions.
-
Andrew Savonichev authored
-
Andrew Savonichev authored
These registers are used as operands for instructions that expect an integer register, so they should be added to Int32Regs or Int64Regs register classes. Otherwise the machine verifier emits an error for the following LIT tests when LLVM_ENABLE_MACHINE_VERIFIER=1 environment variable is set: *** Bad machine code: Illegal physical register for instruction *** - function: kernel_func - basic block: %bb.0 entry (0x55c8903d5438) - instruction: %3:int64regs = LEA_ADDRi64 $vrframelocal, 0 - operand 1: $vrframelocal $vrframelocal is not a Int64Regs register. CodeGen/NVPTX/call-with-alloca-buffer.ll CodeGen/NVPTX/disable-opt.ll CodeGen/NVPTX/lower-alloca.ll CodeGen/NVPTX/lower-args.ll CodeGen/NVPTX/param-align.ll CodeGen/NVPTX/reg-types.ll DebugInfo/NVPTX/dbg-declare-alloca.ll DebugInfo/NVPTX/dbg-value-const-byref.ll Differential Revision: https://reviews.llvm.org/D110164 -
Florian Hahn authored
Running -vector-combine early can introduce new vector operations, blocking loop/SLP vectorization. The added test case could be better optimized by the SLPVectorizer if no new vector operations are added early.
-
Jonas Paulsson authored
-
Andrew Savonichev authored
The patch attempts to optimize a sequence of SIMD loads from the same base pointer: %0 = gep float*, float* base, i32 4 %1 = bitcast float* %0 to <4 x float>* %2 = load <4 x float>, <4 x float>* %1 ... %n1 = gep float*, float* base, i32 N %n2 = bitcast float* %n1 to <4 x float>* %n3 = load <4 x float>, <4 x float>* %n2 For AArch64 the compiler generates a sequence of LDR Qt, [Xn, #16]. However, 32-bit NEON VLD1/VST1 lack the [Wn, #imm] addressing mode, so the address is computed before every ld/st instruction: add r2, r0, #32 add r0, r0, #16 vld1.32 {d18, d19}, [r2] vld1.32 {d22, d23}, [r0] This can be improved by computing address for the first load, and then using a post-indexed form of VLD1/VST1 to load the rest: add r0, r0, #16 vld1.32 {d18, d19}, [r0]! vld1.32 {d22, d23}, [r0] In order to do that, the patch adds more patterns to DAGCombine: - (load (add ptr inc1)) and (add ptr inc2) are now folded if inc1 and inc2 are constants. - (or ptr inc) is now recognized as a pointer increment if ptr is sufficiently aligned. In addition to that, we now search for all possible base updates and then pick the best one. Differential Revision: https://reviews.llvm.org/D108988 -
Simon Pilgrim authored
Avoids unused assignment scan-build warning.
-
Simon Pilgrim authored
Fixes scan-build warning about dead initialization
-
Kirill Bobyrev authored
Reviewed By: sammccall Differential Revision: https://reviews.llvm.org/D111698
-
Nicolas Vasilache authored
-
Simon Pilgrim authored
Without SSE41 sext/zext instructions the extensions will be split, meaning that the MUL->PMADDWD fold will split the sext_i32(x) into zext_i32(sext_i16(x))
-
Simon Pilgrim authored
2 returns, one after the other - reported by coverity
-
Alex Zinenko authored
Improve support for variadic regions in ODS-generated operation view classes. In particular, make generated constructors take an extra argument that specifies the number of variadic regions if the operation has them. Previously, there was no mechanism to specify a non-zero number of variadic regions. Also generate named accessors to regions. Reviewed By: gysit Differential Revision: https://reviews.llvm.org/D111783
-
Alex Zinenko authored
MemRefType was using a wrong `isa` function in the bindings code, which could lead to invalid IR being constructed. Also run the verifier in memref dialect tests. Reviewed By: nicolasvasilache Differential Revision: https://reviews.llvm.org/D111784
-
Jeremy Morse authored
Some functions get opted out of instruction referencing if they're being compiled with no optimisations, however the LiveDebugValues pass picks one implementation and then sticks with it through the rest of compilation. This leads to a segfault if we encounter a function that doesn't use instr-ref (because it's optnone, for example), but we've already decided to use InstrRefBasedLDV which expects to be passed a DomTree. Solution: keep both implementations around in the pass, and pick whichever one is appropriate to the current function.
-
Uday Bondhugula authored
Fix assert crash when an unregistered dialect op is encountered during parsing and `-allow-unregistered-dialect' isn't on. Instead, emit an error. While on this, clean up "registered" vs "loaded" on `getDialect()` and local clang-tidy warnings. https://llvm.discourse.group/t/assert-behavior-on-unregistered-dialect-ops/4402 Differential Revision: https://reviews.llvm.org/D111628
-
Tobias Gysi authored
Setting the nofold attribute enables packing an operand. At the moment, the attribute is set by default. The pack introduces a callback to control the flag. Reviewed By: nicolasvasilache Differential Revision: https://reviews.llvm.org/D111718
-
Josh Mottley authored
This patch replaces all uses of std::vector with llvm::SmallVector in the flang-omp-report plugin. This is a one of several patches focusing on switching containers from STL to LLVM's ADT library. Reviewed By: Leporacanthicus Differential Revision: https://reviews.llvm.org/D111709
-
Tobias Gysi authored
After removing the last LinalgOps that have no region attached we can verify there is a region. The patch performs the following changes: - Move the SingleBlockImplicitTerminator trait further up the the structured op base class. - Adapt the LinalgOp verification since the trait only check if there is 0 or 1 block. - Introduce a getBlock method on the LinalgOp interface. - Access the LinalgOp body using either getBlock() or getBody() if the concrete operation type is known. This patch is a follow up to https://reviews.llvm.org/D111233. Reviewed By: nicolasvasilache Differential Revision: https://reviews.llvm.org/D111393
-
Pavel Labath authored
-
Jonas Paulsson authored
This reverts 3562076d and includes some refactoring as well. Review: Ulrich Weigand Differential Revision: https://reviews.llvm.org/D111733
-
Jonas Paulsson authored
This patch fixes the bug that consisted of treating variable / immediate length mem operations (such as memcpy, memset, ...) differently. The variable length case needs to have the length minus 1 passed due to the use of EXRL target instructions. However, the DAGCombiner can convert a register length argument into a constant one, and whenever that happened one byte too little would end up being performed. This is also a refactorization by reducing the number of opcodes and variants involved. For any opcode (variable or constant length), only the length minus one is passed on to the ISD node. The rest of the logic is now instead handled during isel pseudo expansion. Review: Ulrich Weigand Differential Revision: https://reviews.llvm.org/D111729
-
Martin Storsjö authored
This makes the compiler generated code for accessing the thread local variable much simpler (no need for wrapper functions and weak pointers to potential init functions), and can avoid toolchain bugs regarding how to access TLS variables. In particular, this fixes LLDB when built with current GCC/binutils for MinGW, see https://github.com/msys2/MINGW-packages/issues/8868. Differential Revision: https://reviews.llvm.org/D111779
-
Pavel Labath authored
When we know the bounds of the array, print any embedded nuls instead of treating them as terminators. An exception to this rule is made for the nul character at the very end of the string. We don't print that, as otherwise 99% of the strings would end in \0. This way the strings usually come out the same as how the user typed it into the compiler (char foo[] = "with\0nuls"). It also matches how they come out in gdb. This resolves a FIXME left from D111399, and leaves another FIXME for dealing with nul characters in "escape-non-printables=false" mode. In this mode the characters cause the entire summary string to be terminated prematurely. Differential Revision: https://reviews.llvm.org/D111634
-
Max Kazantsev authored
Replace check with if ((ExitIfTrue && CI->isZero()) || (!ExitIfTrue && CI->isOne())) with equivalent and simpler version if (ExitIfTrue == CI->isZero()) -
Max Kazantsev authored
Check lightweight getter condition before calling all_of.
-
Arthur Eubanks authored
gcc does not support __has_feature(), so this was accidentally changed in D111581 when compiling with gcc.
-
Valentin Clement authored
Remove unsused variable that break Werror on some buildbots
-
Ben Shi authored
Opitimize immediate materialisation in the following way if profitable: 1. Use BCLRI for upper 32 bits if the lower 32 bits are negative int32. 2. Use BSETI for upper 32 bits if the lower 32 bits are positive int32. Reviewed By: craig.topper Differential Revision: https://reviews.llvm.org/D111508
-