- May 13, 2023
-
-
Philip Reames authored
This has been present from the original patch which added the pass, and doesn't appear to be strongly justified. We do need to be careful of commutativity. Differential Revision: https://reviews.llvm.org/D150468
-
Alex Langford authored
Similar to dw_form_t, dw_attr_t is typedef'd to be a uint16_t. LLVM defines their type `llvm::dwarf::Attribute` as an enum backed by a uint16_t. Switching to the LLVM type buys us type checking and the requirement of explicit casts. Differential Revision: https://reviews.llvm.org/D150299
-
spupyrev authored
This diff facilitates a new stale profile matching in BOLT: D144500 This is a no-op for existing usages of profi (CSSPGO). Reviewed By: hoy Differential Revision: https://reviews.llvm.org/D150466
-
Harsh Menon authored
Non-subview uses of an alloc outside the current loop can be safely ignored when considering hoisting vector transfer_reads. This patch adds a condition to check for that case and updates the unit test accordingly. Differential Revision: https://reviews.llvm.org/D150469
-
ziqingluo-90 authored
The unsafe-buffer analysis requires a complete view of the translation unit (TU) to be conservative. So the analysis is moved to the end of a TU. A summary of changes made: add a new `IssueWarnings` function in `AnalysisBasedWarnings.cpp` for TU-based analyses. So far [-Wunsafe-buffer-usage] is the only analysis using it but there could be more. `Sema` will call the new `IssueWarnings` function at the end of parsing a TU. Reviewed by: NoQ (Artem Dergachev) Differential revision: https://reviews.llvm.org/D146342
-
Slava Zakharin authored
The codegen tried to fir.convert !fir.box to !fir.ref for this case. I used BoxAddr under a check for the type mismatch, but I am not sure if this is the right fix. Maybe it has to be handled in the lowering.
-
Hui authored
One of the overload of the constructors should check Bound is not unreachable_sentinel_t, instead of the Start Differential Revision: https://reviews.llvm.org/D150206
-
Florian Hahn authored
This patch adds a heuristic to skip if-conversion if the condition has a high chance of being predictable. If the condition is in a loop, consider it predictable if the condition itself or all its operands are loop-invariant. E.g. this considers a load from a loop-invariant address predictable; we were unable to prove that it doesn't alias any of the memory-writes in the loop, but it is likely to read to same value multiple times. This is a relatively crude heuristic, but it helps to prevent excessive if-conversion in multiple workloads in practice. Reviewed By: apostolakis Differential Revision: https://reviews.llvm.org/D141639
-
Joseph Huber authored
We use this helper to make several internal global variables during codegen. currently we do not specify any alignment which allows the alignment to be set incorrectly after some changes in how alignment was handled. This patch explicitly aligns these variables to the natural alignment as specified by the data layout Fixes https://github.com/llvm/llvm-project/issues/62668 Reviewed By: tianshilei1992, gchatelet Differential Revision: https://reviews.llvm.org/D150461
-
Joseph Huber authored
We support asynchronous sends, that means that the kernel can issue a send, then exit the kernel as we do with the `EXIT` syscall. Because of the condition it's therefore possible for the kernel to exit and break from the loop before we check the server again. This can potentially cause us to ignore an `EXIT` call from the GPU. Reviewed By: JonChesterfield, lntue Differential Revision: https://reviews.llvm.org/D150456
-
Mathieu Fehr authored
This reverts commit 52761cb9.
-
Fangrui Song authored
Inspired by D133662. Close https://github.com/llvm/llvm-project/issues/57285 When -ftime-trace is specified and the driver performs both compilation and linking phases, the trace files are currently placed in the temporary directory (/tmp by default on *NIX). A more sensible behavior would be to derive the trace file names from the -o option, similar to how GCC derives auxiliary and dump file names. Use -dumpdir (D149193) to implement the -gsplit-dwarf like behavior. The following script demonstrates the time trace filenames. ``` #!/bin/sh -e PATH=/tmp/Rel/bin:$PATH # adapt according to your build directory mkdir -p d e f echo 'int main() {}' > d/a.c echo > d/b.c a() { rm $1 || exit 1; } clang -ftime-trace d/a.c d/b.c # previously /tmp/[ab]-*.json a a-a.json; a a-b.json clang -ftime-trace d/a.c d/b.c -o e/x # previously /tmp/[ab]-*.json a e/x-a.json; a e/x-b.json clang -ftime-trace d/a.c d/b.c -o e/x -dumpdir f/ a f/a.json; a f/b.json clang -ftime-trace=f d/a.c d/b.c -o e/x a f/a-*.json; a f/b-*.json clang -c -ftime-trace d/a.c d/b.c a a.json b.json clang -c -ftime-trace=f d/a.c d/b.c a f/a.json f/b.json clang -c -ftime-trace d/a.c -o e/xa.o a e/xa.json clang -c -ftime-trace d/a.c -o e/xa.o -dumpdir f/g a f/ga.json ``` The driver checks `-ftime-trace` and `-ftime-trace=`, infers the trace file name, and passes `-ftime-trace=` to cc1. The `-ftime-trace` cc1 option is removed. With offloading, previously `-ftime-trace` is passed to all offloading actions, causing the same trace file to be overwritten by host and offloading actions. This patch doesn't attempt to support offloading (D133662), but makes a sensible change (`OffloadingPrefix.empty()`) to ensure we don't overwrite the trace file. Minor behavior differences: the trace file is now a result file, which will be removed upon an error. -ftime-trace-granularity=0, like -ftime-trace, can now cause a -Wunused-command-line-argument warning. Reviewed By: Maetveis Differential Revision: https://reviews.llvm.org/D150282
-
Aart Bik authored
This revision extends the GPU dialect with ops that can be lowered to host-oriented sparse matrix library calls (in this case cuSparse focused although the ops could be generalized to support more GPUs in principle). This will allow the "sparse compiler pipeline" to accelerate sparse operations (see follow up revisions with examples of this). For some background; https://discourse.llvm.org/t/sparse-compiler-and-gpu-code-generation/69786/2 Reviewed By: ThomasRaoux Differential Revision: https://reviews.llvm.org/D150152
-
Mathieu Fehr authored
This patch adds verification on registered IRDL operations, types, and attributes. This is done through an interface implemented by operations from the `irdl` dialect, which translate the operations into `Constraint`. This interface is then use in the `registerDialect` function to generate verifiers for the entire operation/type/attribute. Depends on D145733 Reviewed By: Mogball Differential Revision: https://reviews.llvm.org/D145734
-
Philip Reames authored
Use a switch to avoid repeat tests on the opcode, and factor out some common code out of another switch. (Not all branches had both common bits, but the one which didn't left the values unchanged and their starting value is the respective operand - so storing it back is a nop.)
-
Vitaly Buka authored
Bionic uses pthread_exit to set retval, when GLIBC does not. This cause double call to Finish. Rather then tracking this difference on interceptor size, we can just relax precondition. It does not make a difference.
-
Jeffrey Tan authored
This patch fixes libstdc++ data formatter for reference/pointer to std::string. The failure testcases are added which succeed with the patch. Differential Revision: https://reviews.llvm.org/D150313
-
Leandro Lupori authored
These tests always time out on ARM buildbot. Disabling them for now, until https://github.com/llvm/llvm-project/issues/62684 is fixed.
-
Michael Maitland authored
Add llvm-mca tests for RISCV LMUL instruments to show that llvm-mca RISCV LMUL instruments work. This commit was previously reverted in ad8765a0. This commit adds a lit.local.cfg to make RISCV llvm-mca tests unsupported on non-RISCV configurations. Differential Revision: https://reviews.llvm.org/D149496
-
Craig Topper authored
-
Nicolas Vasilache authored
-
Nicolas Vasilache authored
-
Michael Maitland authored
This commit passed buildable tests in phabricator, but fails once committed. This reverts commit 1dedc96d.
-
Krzysztof Drewniak authored
While the original motivation for this patch (address space 7 on AMDGPU) has been reworked and is not presently planned to reach IR translation, the incorrect (by the spec) handling of index offset width in IR translation and CodeGenPrepare is likely to trip someone - possibly future AMD, since we have a p7:160:256:256:32 now, so we convert to the other API now. Reviewed By: aemerson, arsenm Differential Revision: https://reviews.llvm.org/D143526
-
Michael Maitland authored
Add llvm-mca tests for RISCV LMUL instruments to show that llvm-mca RISCV LMUL instruments work. Differential Revision: https://reviews.llvm.org/D149496
-
Aart Bik authored
Reviewed By: Peiming Differential Revision: https://reviews.llvm.org/D150414
-
Craig Topper authored
Correct the legality of i32 mul_lohi on AArch64. Previously, AArch64 incorrectly reported i32 mul_lohi as Legal. This allowed BuildUDIV/SDIV to use them. A later DAGCombiner would replace them with MULHS/MULHU because only the high half was used. This conversion does not check the legality of MULHS/MULHU under the assumption that LegalizeDAG can turn it back into MUL_LOHI later. After they are converted to MULHS/MULHU, DAGCombine ran and saw that these operations aren't supported but an i64 MUL is. So they get converted to that plus a shift. Without this, LegalizeDAG would convert back MUL_LOHI and isel would fail to find a pattern. This patch teaches BuildUDIV/SDIV to create the wide mul and shift so that we can report the correct operation legality on AArch64. It also enables div by constant folding for more cases on VE. I don't know if VE wants this div by constant optimization or not. If they don't want it, they can use the isIntDivCheap hook to disable it. Reviewed By: RKSimon Differential Revision: https://reviews.llvm.org/D150333
-
Felipe de Azevedo Piovezan authored
This commit implements SelectionDAG lowering of dbg.declare intrinsics targeting swiftasync Arguments, by putting them in the MachineFunction's table of variables whose location doesn't change throughout the function. Depends on D149882 Differential Revision: https://reviews.llvm.org/D149883
-
- May 12, 2023
-
-
Krzysztof Drewniak authored
While pointers in address space 7 (128 bit rsrc + 32 bit offset) should be rewritten out of the code before IR translation on AMDGPU, higher-level analyses may still call MVT getPointerTy() and the like on the target machine. Currently, since there is no MVT::i160, this operation ends up causing crashes. The changes to the data layout that caused such crashes were D149776. This patch causes getPointerTy() to return the type MVT::v5i32 and getPointerMemTy() to be MVT::v8i32. These are accurate types, but mean that we can't use vectors of address space 7 pointers during codegen. This is mostly OK, since vectors of buffers aren't supported in LPC anyway, but it's a noticable limitation. Potential alternative solutions include adjusting getPointerTy() to return an EVT or adding MVT::i160 and MVT::i256, both of which are rather disruptive to the rest of the compiler. Reviewed By: foad Differential Revision: https://reviews.llvm.org/D150002
-
Felipe de Azevedo Piovezan authored
This commit implements IRTranslator lowering of dbg.declare intrinsics targeting swiftasync Arguments, by putting them in the MachineFunction's table of variables whose location doesn't change throughout the function. Depends on D149881 Differential Revision: https://reviews.llvm.org/D149882
-
Konstantin Zhuravlyov authored
Differential Revision: https://reviews.llvm.org/D149986
-
Mark de Wever authored
The newer formatters for (tuple, vector<bool>::reference) specify the formatter's parse and format member function. This signature is slightly different from the signature for existing formatters. Adapt the existing formatters to the new style. Reviewed By: ldionne, #libc Differential Revision: https://reviews.llvm.org/D150034
-
Mark de Wever authored
These tests should have added -std=c++23 instead of replacing -std=c++2b in D149553. Reviewed By: aaron.ballman Differential Revision: https://reviews.llvm.org/D150063
-
Mark de Wever authored
The financial cost of the network I/O for the Clang install artifacts is quite significant. afd3478f improved this by creating tarballs. This commit improves the tarball by using xz compression instead of gzip. This option is the slowest, but gives the smallest size. size time time (compression) (decompression) gzip 51 M 7 s 1.2 s bz2 44 M 17 s 5.8 s xz 33 M 76 s 3.1 s Reviewed By: ldionne, #libc Differential Revision: https://reviews.llvm.org/D150062
-
Simon Pilgrim authored
Fixes #62653
-
Benoit Jacob authored
Also some simplifications: * `outputBufferOperands` was unused. * The condition that the number of operands equals the number of inputs plus the number of inits seemed vacuously true (?). Differential Revision: https://reviews.llvm.org/D150376
-
Jeffrey Byrnes authored
Change-Id: I608f14ac3a504cc668f93f130a17dea3950fa554
-
Oleg Shyshkov authored
With this change, more `memref.copy` will be lowered to the efficient `memcpy`. For example, ``` memref.copy %subview, %alloc : memref<1x576xf32, strided<[704, 1]>> to memref<1x576xf32> ``` Differential Revision: https://reviews.llvm.org/D150448
-
Florian Hahn authored
As pointed out by @jpenix-quic in D149668 post-commit, machine instructions without memory operands need to be treated conservatively.
-
Shengchen Kan authored
1. Share code `optimizeInstFromVEX3ToVEX2` with MCInstLower 2. Move the code of optimization for shift/rotate to a separate file 3. Since the function is shared, a side effect is that more encoding optimizations are done on the Asmparser side. Considering we already use reverse-encoding for optimization in AsmParser before this patch, I believe the change is positive and expected. This is a reland of D150068 with the fix D150440.
-