2738 Commits

Author SHA1 Message Date
Jeremy Kun
a3d2b7e2cb
[mlir][polynomial] Remove polynomial dialect (#139766)
Cf. https://discourse.llvm.org/t/future-of-the-polynomial-dialect/86117

For posterity, the polynomial dialect development has moved to HEIR, and
as of this writing the different components can be found here:

-
a422f130fa/lib/Dialect/Polynomial
-
a422f130fa/lib/Transforms/PolynomialApproximation
-
a422f130fa/lib/Transforms/LowerPolynomialEval
2025-05-13 16:04:30 -07:00
Jorge Gorbe Moya
8af397af65 [bazel] Add missing dep after 810148cb0769f61f8afebdaf27a9c1af95de27aa 2025-05-13 11:49:07 -07:00
Jorge Gorbe Moya
165d47ef70 [bazel] Add missing deps after 91f3cdbd4f173c534d718322ef6b1ec537024af6 2025-05-13 10:24:15 -07:00
Jorge Gorbe Moya
5fb742ae27 [bazel] port 3bdfa6f3e8ebb6b3c139a7f4929f7016a6f56386 2025-05-12 19:17:02 -07:00
Jorge Gorbe Moya
227328f6f6 [bazel] Add missing dep after d896e2883e6f6b6266fa745ab758adc351778a89 2025-05-12 15:11:33 -07:00
Benjamin Kramer
fbd056532f [bazel] Port db42345dc660329e34fd119fc8edab74521f7c06 2025-05-12 19:11:40 +02:00
Benjamin Kramer
3197909694 [bazel] Fix lldb-dap-Info.plist.in path after 6f84ec3496f5ec9038a59c11d2ea495f1e601049 2025-05-12 13:27:10 +02:00
NAKAMURA Takumi
6f4dcaed6b [bazel] Update AVR TableGen (for #139407) 2025-05-12 06:43:05 +09:00
Jorge Gorbe Moya
0eae457be3 [bazel] Add missing deps for 9ca46640062a6c0b955d16ad6f88305b534af8a3 2025-05-09 15:23:43 -07:00
Jorge Gorbe Moya
1678f47a91 [bazel] add missing dep for 74ed33484e84a331591fde66f7375c26bbf14672 2025-05-09 15:16:14 -07:00
Jorge Gorbe Moya
ccaf69a334 [bazel] Port c60db55568e82fd7b70dfec017d23e19aed6925f 2025-05-09 14:32:17 -07:00
Mikhail Goncharov
7618ce880d [bazel] port f9f2bf8e5e5c266a51b4ec6d23317a7e3dfeb670 2025-05-09 13:47:23 +02:00
Jordan Rupprecht
2693a715bf
[bazel] Port 515b4a4fdd7ac97373b68850a2ffa72e2b8e9178 (#139155) 2025-05-08 16:06:15 -05:00
Benjamin Kramer
1d3f8f4871 [bazel] Port 92cc31b0f7737408dffd38c2384dff825abb8e3a for Lanai 2025-05-08 14:09:29 +02:00
Alexey Samsonov
215dbcb2bc
[bazel] Enable header processing for C++ builds. (#138934)
This would only work for projects that explicitly enable "parse_headers"
feature (or for builds that specify this on command-line) - right now
there are none, so this change shouldn't affect most builds. When
"parse_headers" is enabled though, it would catch problems of
incorrect/missing includes in header-only cc_libraries.

See https://bazel.build/docs/bazel-and-cpp#toolchain-features on why
this option is a best practice for C++ projects.
2025-05-07 22:18:05 -07:00
Jordan Rupprecht
28521368d7
[bazel] Port 6babd63a4bbc094bee4ef8e75f95dccd32325c15 (#139026) 2025-05-08 00:16:40 -05:00
Alexey Samsonov
98d26b8f67
[libc][bazel] Re-enable memcpy prefetching on x86. (#138945)
It was re-enabled downstream after further performance analysis, so we
can revert c65ed964657c93d51f3e05de9e0609419768a143, effectively
re-landing the change.
2025-05-07 22:14:21 -07:00
NAKAMURA Takumi
c6c2e21028 [bazel] Update Sparc (for #138450) 2025-05-06 11:00:48 +09:00
Christian Sigg
1b479e8314
[bazel] NFC: Change tbl_outs to dicts. (#137788)
There were some `gentbl_cc_library` targets left to convert.

Allow `gentbl_filegroup` rule to take a dict as well and change all
targets.

Move lld/BUILD.bazel from //llvm:tblgen.bzl to //mlir:tblgen.bzl, delete
the former.

This makes the BUILD files shorter and more readable.
2025-05-05 10:06:23 +02:00
Jorge Gorbe Moya
cd6a614ef5 [bazel] Add missing dep after a073bb5afdb8715429d98ea80ecdef1390fb4962 2025-05-01 15:16:38 -07:00
Jorge Gorbe Moya
472c211f58 [bazel] Add deps missing from 0009a1783490a8ff69251a0ec7df1891a427cfb0 to //mlir:AllExtensions 2025-05-01 15:07:43 -07:00
Mircea Trofin
b6d4b7eba1
[mlir][EmitC] Add Bazel rules for conversions (#138154)
Follow-up from #117549

tested by:

```
cd utils/bazel
bazelisk build --config=generic_clang @llvm-project//mlir:all
bazelisk test --config=generic_clang @llvm-project//mlir/test:all
```
2025-05-01 10:27:35 -07:00
NAKAMURA Takumi
c588224ca7 [bazel] Turn on LLVM_ENABLE_DEBUGLOC_COVERAGE_TRACKING
This has been defined in #137787 and affects in
llvmorg-21-init-10310-g92195f6fc873 (#137787).
2025-05-01 11:37:11 +09:00
Keith Smiley
c3715ecb1e
[bazel] Add clang-apply-replacements BUILD file (#138054) 2025-04-30 16:57:35 -07:00
Jorge Gorbe Moya
27e8e08b66
[bazel] port d30554b19edc27bc9ca3475b888c1b3e4eda87c4 (#138022) 2025-04-30 16:18:48 -05:00
Stephen Tozer
3e523502a1
[DLCov] Move DebugLoc coverage macro to llvm-config.h (#137787)
This patch follows the reversion of #107279, which caused errors by
including `llvm/Config/config.h` in a public header. In order to reapply
that patch, this PR moves the definition of the config option to the
`llvm-config.h` header instead, so that it can be used publicly. This
patch also adds `LLVM_` as a prefix to the define, since it is now in a
public header.
2025-04-30 10:23:30 +01:00
NAKAMURA Takumi
b262785137 [bazel] Give ConstantFolding.cpp "-ftrapping-math" (for #137652)
I've introduced the split lib `AnalysisFpExc`. Let me know if better
solutions would be applicable.
2025-04-30 16:20:43 +09:00
Keith Smiley
a9a891029d
[bazel] Fix layering check violation (#137734)
I broke this in 2ce6333a41a68c89866d4075527bd43ce8fd3b6c since I only
tested with a toolchain that doesn't support layering checks
2025-04-28 16:37:51 -07:00
Keith Smiley
2ce6333a41
[bazel] Fix lldb ODR issue (#137729)
In 42622c79592b98b899d787c89db11cea1b540b96, depending on the entire
utility library resulted in the lldb binary having more symbols that it
needs, duplicating those in liblldb, leading to odr violations. Now
instead we just expose the Host library's headers, which happens to be
enough for this to compile and link, referencing the symbols from
liblldb
2025-04-28 16:30:54 -07:00
Alexey Samsonov
882bae9f43
[libc][bazel] Make top section of BUILD.bazel files more uniform. (#137689)
Make sure all BUILD.bazel files under llvm-libc are specifying
package-level default_visibility and licenses.

Add top-level license notice and comment to new BUILD.bazel for
complex.h functions.
2025-04-28 12:40:24 -07:00
Jorge Gorbe Moya
4050a6a3d5 [bazel] add missing dep after a74e4ac9d52029f9c9fe80654acd9fdd34d2a4cd 2025-04-25 20:29:02 -07:00
Alexey Samsonov
157dfcf531
[libc][bazel] Fix BUILD.bazel after 5ff2774. (#137404)
Add a missing dependency to __support_macros_null_check.
2025-04-25 18:06:30 -04:00
Augie Fackler
119910a8f8 [bazel] catch BUILD files up to d555b9f9a01705097edf2434cf897e351095e5c9 in lldb 2025-04-25 13:03:18 -04:00
Sergei Lebedev
6d99d1a4a9
[mlir][bazel] Added a target for the CF dialect C API (#137146) 2025-04-25 06:54:12 +02:00
Keith Smiley
42622c7959
[bazel] Depend on full Utility library in lldb (#137265)
Since 6493345c5ab96f60ab5ee38272fb6635f2083318 the utility library is
needed by the driver. Since liblldb's exports are limited with
-exports_symbols_list on macOS, some symbols like
`__ZN12SelectHelper10FDSetWriteEi` are not exported from liblldb and
therefore cause linker failures on macOS only. In the cmake the driver
now depends on the full utility library, even though that leads to some
duplication of symbols, so it should be safe for us to do in bazel as
well.
2025-04-24 16:22:56 -07:00
Christian Sigg
e37c236597
[mlir][bazel] Remove unnecessary dependencies. (#136999) 2025-04-24 12:04:37 +02:00
Jorge Gorbe Moya
178cdbf746 [bazel] Add missing deps in mlir/test/BUILD.bazel after 905f1d8068a5bc1149732b46afc3f5dd780aa5d9 2025-04-23 18:27:49 -07:00
Jorge Gorbe Moya
adab66f7a5 [bazel] Add missing deps after 905f1d8068a5bc1149732b46afc3f5dd780aa5d9 2025-04-23 18:09:25 -07:00
Keith Smiley
a0fce0ba31
[bazel] Use non_arc_srcs instead of passing -fno-objc-arc (#137037)
This is the recommended way in bazel to differentiate between files that
require arc and those that require it be disabled. This matters
depending on the toolchain since the order of these flags may not have
been correct and we were relying on overwriting the default.
2025-04-23 11:37:23 -07:00
Christian Sigg
237ed0cffc [mlir][bazel] Port 0f32809139bd104adb2c1de4fa1044da78a7e5af. 2025-04-23 16:12:55 +02:00
Christian Sigg
dfc60b2ceb [mlir][bazel] Also add SideEffectInterfaces dep to PtrDialect.
Fix for port of e112dcc.
2025-04-23 09:01:45 +02:00
Christian Sigg
439f16a7e1 [mlir][bazel] Port e112dccc8ba49425c575a6b15325f2cbeef5c606. 2025-04-23 07:15:38 +02:00
Christian Sigg
7851b1bcf1
[mlir][gpu] Change GPU modules to globals (#135478)
Load/unload GPU modules in global ctors/dtors instead of each time when
launching a kernel.

Loading GPU modules is a heavy-weight operation and synchronizes the GPU
context. Now that the modules are loaded ahead of time, asynchronously
launched kernels can run concurrently, see
https://discourse.llvm.org/t/how-to-lower-the-combination-of-async-gpu-ops-in-gpu-dialect.

The implementations of `embedBinary()` and `launchKernel()` use slightly
different mechanics at the moment but I prefer to not change the latter
more than necessary as part of this PR. I will prepare a follow-up NFC
for `launchKernel()` to align them again.
2025-04-22 13:49:58 +02:00
Christian Sigg
c60f24dca9
[lldb][mlir] Fix port of a22ad65
Sorry, typo!
2025-04-22 13:47:30 +02:00
Christian Sigg
ef926e7e49
[lldb][mlir] Port a22ad659cd0665669d89fae174f9e6a83d1a446d 2025-04-22 13:43:50 +02:00
lexi-nadia
1e803770a5
[mlir][SMT] update Bazel configuration to match 697aa99 (#136616)
Update Bazel configuration to match
697aa9995c24a977425e672d76a4a434384b16e3.
2025-04-21 14:34:34 -07:00
Alexey Samsonov
863ead29e9
[libc][bazel] Add a helper library with all deps of generated headers. (#136582)
Create "public_header_deps" that is a convenient way to express
dependencies of a generated headers as a single (and same) target. It's
also convenient to use it in unit tests - which is also demonstrated in
this PR by adding the BUILD.bazel placeholder for test/include unit
tests, and creating a libc_test target for one of these tests.

See issue #134780.
2025-04-21 13:43:31 -07:00
Rahul Joshi
e1bb7f6dde
[LLVM][TableGen] Parameterize NumToSkip in DecoderEmitter (#136456)
- Add command line option `num-to-skip-size` to parameterize the size of
`NumToSkip` bytes in the decoder table. Default value will be 2, and
targets that need larger size can use 3.
- Keep all existing targets, except AArch64, to use size 2, and change
AArch64 to use size 3 since it run into the "disassembler decoding table
too large" error with size 2.
- Additional fixes on top of earlier revert: mark `decodeNumToSkip` as
static (not necessary anymore as the generated code is now in anonymous
namespace, but doing it for consistency) and incorporate Bazel build
changes from https://github.com/llvm/llvm-project/pull/136212
- Following is a rough reduction in size for the decoder tables by
switching to size 2.

```
Target         Old Size   New Size   % Reduction
================================================
AArch64           153254     153254        0.00
AMDGPU            471566     412805       12.46
ARC                 5724       5061       11.58
ARM                84936      73831       13.07
AVR                 1497       1306       12.76
BPF                 2172       1927       11.28
CSKY               10064       8692       13.63
Hexagon            47967      41965       12.51
Lanai               1108        982       11.37
LoongArch          24446      21621       11.56
MSP430              4200       3716       11.52
Mips               36330      31415       13.53
PPC                31897      28098       11.91
RISCV              37979      32790       13.66
Sparc               8331       7252       12.95
SystemZ            36722      32248       12.18
VE                 48296      42873       11.23
XCore               2590       2316       10.58
Xtensa              3827       3316       13.35
```
2025-04-21 08:15:08 -07:00
Christian Sigg
71037ee9de [llvm][bazel] Port 667209e45122d0cb7a4c2ac27018d31165b1be70. 2025-04-20 07:56:05 +02:00
Christian Sigg
a71a2542a1 [clang][bazel] Port d1cce66469d0739f332b11fdb0fa2a441b1e0483 2025-04-19 07:59:43 +02:00