1372 Commits

Author SHA1 Message Date
Dmitry Chernenkov
c1b829778d [bazel] Bazel fix for 69bd7fae2b037c6538d531f39c25c160d8e6ff87 2023-07-25 09:58:57 +00:00
Goran Flegar
179d2efce6 [bazel][mlir] Port ca9a3354d04b15366088d7831b40f891e3d77b95 2023-07-25 11:44:41 +02:00
Jordan Rupprecht
cab89fe23a [bazel] Add UPToSPIRV library/dep
Added in D156163
2023-07-24 19:33:33 -07:00
Nicolas Vasilache
90ecfa2a40 [mlir][linalg] NFC - Move some utils in preparation for revamping mapping of scf.forall 2023-07-25 01:19:57 +02:00
Benjamin Kramer
033efb3fe8 [bazel][mlir] Port 0f446adf678212b6daedebc5eb1bd2849b1efad1 2023-07-24 19:21:18 +02:00
Benjamin Kramer
f586face79 [bazel] Turn off layering_check for //llvm/unittests:target_aarch64_tests
llvm/unittests/Target/AArch64/AArch64SVESchedPseudoTest.cpp:38:10: error: module @llvm-project//llvm/unittests:target_aarch64_tests does not depend on a module exporting 'AArch64GenInstrInfo.inc'

Test was added in 57329ca94630742ce3b0f6b239b263d757a9eb4a
2023-07-24 19:16:26 +02:00
Benjamin Kramer
ff380ced05 [bazel] Add missing dependency for b2d76a063dd7fb681c98a10d8e7f54fd6d25dd27 2023-07-22 13:21:51 +02:00
Mikhail Goncharov
6de59222e2 [bazel] update config.h.cmake 2023-07-21 17:38:28 +02:00
Benjamin Kramer
c4303920f1 [bazel] Tweak dependency spaghetti after 70c2e0618a0f3c09ed7149d88b4987b932eb6705 2023-07-21 13:54:31 +02:00
Benjamin Kramer
977633b26a [bazel] Port 5d8813dec69360fce897f063a4a65106ae8ea22b 2023-07-21 13:52:32 +02:00
Matthias Springer
544f0e9161 [mlir] Fix build after D155680 2023-07-21 13:33:54 +02:00
Alexander Belyaev
4114f07c2a [mlir] Update bazel build after rG70c2e0618a0f3c09ed7149d88b4987b932eb6705 2023-07-21 13:21:49 +02:00
Alexander Belyaev
e6c62a2dcc [mlir] Fix bazel build after b96bd025b35761ae181da7e1796708c46e59f5d5 2023-07-21 11:08:44 +02:00
Haojian Wu
163268ada0 [bazel] add missing dep for llvm/unittests:frontend_tests 2023-07-21 10:10:15 +02:00
Michael Jones
b9f6c20876 [libc] Move printf writer to new design
The new printf writer design focuses on optimizing the fast path. It
inlines any write to a buffer or string, and by handling buffering
itself can more effectively work with both internal and external file
implementations. The overflow hook should allow for expansion to
asprintf with minimal extra code.

Reviewed By: sivachandra

Differential Revision: https://reviews.llvm.org/D153999
2023-07-20 11:08:20 -07:00
Benjamin Kramer
2bf84d5638 [bazel] Fix dependency path 2023-07-20 17:05:28 +02:00
Benjamin Kramer
3bf19f71df [bazel][clang] Add missing dependency for 8b5d3ba829c162fd4890fd65a4629ce0715825ee 2023-07-20 17:02:50 +02:00
Alexander Belyaev
2b1602df0b [mlir] Add UBDialect to BUILD.bazel. 2023-07-20 15:08:19 +02:00
Martin Erhart
07c079a97a [mlir][bufferization] Add lowering of bufferization.dealloc to memref.dealloc
Adds a generic lowering that suppors all cases of bufferization.dealloc
and one specialized, more efficient lowering for the simple case. Using
a helper function with for loops in the general case enables
O(|num_dealloc_memrefs|+|num_retain_memrefs|) size of the lowered code.

Depends on D155467

Reviewed By: springerm

Differential Revision: https://reviews.llvm.org/D155468
2023-07-19 14:28:01 +00:00
Mikhail Goncharov
571c1292b6 [bazel] remove PythonAttr TD after 67a910bbff772ebf4c47e8b434b59cdc4820bb68
Differential Revision: https://reviews.llvm.org/D155686
2023-07-19 11:46:47 +02:00
Oleg Shyshkov
c425cfa98e [mlir][bazel] Fix build. 2023-07-19 11:11:32 +02:00
Guillaume Chatelet
1f5783474f [libc][NFC] Rename files
This patch mostly renames files so it better reflects the function they declare.

Reviewed By: michaelrj

Differential Revision: https://reviews.llvm.org/D155607
2023-07-19 09:06:29 +00:00
Mikhail Goncharov
5bba176366 [bazel] fix layering check to run bazel with 16.x
Preparation to update bazel builder to use LLVM 16 release
where layering check was enabled https://reviews.llvm.org/D132779

Current setup missed some backsliding in layering check as it has
only on for projects with the check enforced.

Disabled it completely for libc and fixed for DWARFLinkerParallel.
It would be great to re-enable it for libc later.
2023-07-18 22:05:14 +02:00
Adrian Kuegel
7da6e0af1d [mlir][Bazel] Add missing dependency. 2023-07-18 16:10:48 +02:00
Adrian Kuegel
107a7d1f05 [mlir][Bazel] Add VectorToArmSME target. 2023-07-18 16:02:15 +02:00
Adrian Kuegel
7bde09cc24 [mlir][Bazel] Add missing dependency. 2023-07-18 15:51:49 +02:00
Matthias Springer
db393288ff [mlir][NVGPU][transform] Add create_async_groups transform op
This transform looks for suitable vector transfers from global memory to shared memory and converts them to async device copies.

Differential Revision: https://reviews.llvm.org/D155569
2023-07-18 14:36:41 +02:00
Guillaume Chatelet
23dcdbfba7 [libc][NFC] Split memmove implementations per platform
This is a follow up on D154800 and D154770 to make the code structure more principled and avoid too many nested #ifdef/#endif.

Reviewed By: courbet

Differential Revision: https://reviews.llvm.org/D155515
2023-07-18 12:20:23 +00:00
Mikhail Goncharov
d18ce73170 [bazel] fix build of ArithUtils 2023-07-18 09:20:13 +02:00
Nicolas Vasilache
582e1d58bd [mlir][test] Fix linking error post test-lower-to-nvvm
This fixes builds for 7e78ecfe10ea9071234de8d385b87d338d280266 (both cmake and bazel) as well as trim unnecessary dependencies.

This is achieved by moving the functionality to test/lib/GPU which is a more natural landing pad.
2023-07-17 18:43:32 +02:00
Adam Paszke
fbfff1caff [MLIR][CAPI] Add C API dialect registration methods for Arith, Math, MemRef and Vector dialects
Reviewed By: ftynse

Differential Revision: https://reviews.llvm.org/D155450
2023-07-17 14:45:49 +00:00
Alex Zinenko
371366ce27 [mlir][nvgpu] add simple pipelining for shared memory copies
Add a simple transform operation to the NVGPU extension that performs
software pipelining of copies to shared memory. The functionality is
extremely minimalistic in this version and only supports copies from
global to shared memory inside an `scf.for` loop with either
`vector.transfer` or `nvgpu.device_async_copy` operations when
pipelining preconditions are already satisfied in the IR. This is the
minimally useful version that uses the more general loop pipeliner in an
NVGPU-specific way. Further extensions and orthogonalizations will be
necessary.

This required a change to the loop pipeliner itself to properly
propagate errors should the predicate generator fail.

This is loosely inspired from the vesion in IREE, but has less unsafe
assumptions and more principled way of communicating decisions.

Reviewed By: nicolasvasilache

Differential Revision: https://reviews.llvm.org/D155223
2023-07-17 14:29:12 +00:00
Matthias Springer
a4f4d82c35 [mlir][NVGPU][NFC] Clean up code structure
* Move passes to `Transforms` directory.
* Add `Utils.h` (will be utilized in a subsequent change).

Differential Revision: https://reviews.llvm.org/D155427
2023-07-17 14:15:42 +02:00
Guillaume Chatelet
b38dda74fa [libc][NFC] Split memcmp implementations per platform
This is a follow up on D154800 and D154770 to make the code structure more principled and avoid too many nested #ifdef/#endif.

Reviewed By: courbet

Differential Revision: https://reviews.llvm.org/D155181
2023-07-17 11:35:31 +00:00
Guillaume Chatelet
83f3920854 [libc][NFC] Split memset implementations per platform
This is a follow up on D154800 and D154770 to make the code structure more principled and avoid too many nested #ifdef/#endif.

Reviewed By: courbet

Differential Revision: https://reviews.llvm.org/D155174
2023-07-17 11:12:19 +00:00
Oleg Shyshkov
4592543a01 [mlir][bazel] Fix build. 2023-07-17 11:00:20 +02:00
Matthias Springer
88f4292a16 [mlir][bufferization] OneShotBufferizeOp: Add options to use linalg.copy
This new option allows users to specify a custom memcpy op.

Differential Revision: https://reviews.llvm.org/D155280
2023-07-14 13:34:22 +02:00
Hanhan Wang
8fc433f055 [mlir][MemRef] Move narrow type emulation common methods to MemRefUtils.
It also unifies the computation of StridedLayoutAttr. If the stride is
static known value, we can just use it.

Differential Revision: https://reviews.llvm.org/D155017
2023-07-13 14:43:21 -07:00
Guillaume Chatelet
8cc440b3e7 [libc][NFC] Split memcpy implementations per platform
This is a follow up on D154800 and D154770 to make the code structure more principled and avoid too many nested #ifdef/#endif.

Reviewed By: courbet

Differential Revision: https://reviews.llvm.org/D155099
2023-07-13 10:30:38 +00:00
Guillaume Chatelet
1c4e4e03bd [libc][NFC] Split bcmp implementations per platform
This is a follow up on D154800 and D154770 to make the code structure more principled and avoid too many nested #ifdef/#endif.

Reviewed By: courbet

Differential Revision: https://reviews.llvm.org/D155076
2023-07-13 10:19:00 +00:00
Sterling Augustine
39d6fe790c Add bazel support for new DebugBTF component. 2023-07-12 14:57:15 -07:00
Andrés Villegas
4f92557bfc [NFC][llvm-dwp] Switch from llvm::cl to OptTable
Switch the parse of command line options from llvm::cl to OptTable.

The motivation for this change is to continue adding llvm based tools
to the llvm driver multicall. For more information about the proposal
and motivation, please see https://discourse.llvm.org/t/rfc-llvm-busybox-proposal/58494

Reviewed By: abrachet

Differential Revision: https://reviews.llvm.org/D154642
2023-07-12 19:12:48 +00:00
Adrian Kuegel
a69b2e3d1c [clang][Bazel] Add dependency to the right target. 2023-07-12 10:19:06 +02:00
Adrian Kuegel
93e7ef5907 [clang][Bazel] Add missing dependency. 2023-07-12 10:14:14 +02:00
Sterling Augustine
8df8f01065 Fix bazel build for 5a1cdcbd8698cd263696b38e2672fccac9ec793c 2023-07-11 14:27:40 -07:00
Arthur Eubanks
4cca3de87e [bazel][docs] Update build documentation
Reviewed By: rnk

Differential Revision: https://reviews.llvm.org/D155004
2023-07-11 13:36:27 -07:00
Alex Zinenko
8a918c54bb [mlir] add backward dense dataflow analysis
This is the counterpart to the forward dense dataflow analysis and
integrates into the dataflow framework. The implementation follows the
structure of existing dataflow analyses.

Reviewed By: Mogball, phisiart

Differential Revision: https://reviews.llvm.org/D154713
2023-07-11 16:47:53 +00:00
Aliia Khasanova
be29fe2f98 Fix bazel build file for D154060.
Differential Revision: https://reviews.llvm.org/D154976
2023-07-11 17:33:58 +02:00
NAKAMURA Takumi
82371e68e4 [Bazel] Fixup for D153758, D153850, and D153861 (global-isel-combiner-matchtable) 2023-07-11 22:53:38 +09:00
Fangrui Song
7f7f4a6b17 [bazel] Adjust llvm:DebugInfo after D149501 (BTF.h) 2023-07-10 15:05:51 -07:00