Commit Graph

3115 Commits

Author SHA1 Message Date
Jordan Rupprecht
85dd8f4bff [bazel][uArch][XeGPU] Port #153706: add uArch package (#162872) 2025-10-10 15:44:10 +00:00
Jordan Rupprecht
1d63892bbc [bazel][libc] Port #162685: sysconf (#162719) 2025-10-09 19:03:20 +00:00
Benjamin Kramer
9f1e271575 [bazel] Add missing dependency for 1244fd24d9 2025-10-09 10:05:09 +02:00
Anton Shepelev
1244fd24d9 [libc][math][c23] Add rsqrtf() function (#159615)
Closes #159614

**Changes:**
- Initial implementation of rsqrt for single precision float

**Some small unrelated style changes to this PR (that I missed in my
rsqrtf16 PR):**
- Added extra - to the top comments to make it look nicer in
libc/shared/math/rsqrtf16.h
- Put rsqrtf16 inside of libc/src/__support/math/CMakeLists.txt in
sorted order
- Rearanged libc_math_function rsqrtf16 in Bazel to match alphabetical
order
2025-10-08 23:37:01 -04:00
Jordan Rupprecht
3ccc888f1a [bazel][clang-tidy] Port #162012: zircon deps (#162582) 2025-10-09 02:06:15 +00:00
Jordan Rupprecht
78aa866793 [bazel][libc] Port #154914: fxdivi (#162539) 2025-10-08 19:52:03 +00:00
Jordan Rupprecht
4a9e8eaab9 [bazel][mlir][acc] Port #162328: add ArithDialect dep to OpenACC (#162538) 2025-10-08 19:47:04 +00:00
Kyungtak Woo
419f5f1d89 [bazel] fix: add dependency for SCFToEmitC due to c3aa1584e0 (#162535)
Adding dependency changes due to bazel build failing since
https://github.com/llvm/llvm-project/pull/143008/files
2025-10-08 14:18:37 -05:00
James Y Knight
f0ae4b3bd2 Bazel: fix after "[Offload] Rename and move clang-offload-packager -> llvm-offload-binary (#161438)" 2025-10-07 12:43:12 -04:00
Maksim Levental
93097b2d47 Revert "[MLIR][Python] use FetchContent_Declare for nanobind and remove pybind (#161230)" (#162309)
This reverts commit 84a214856a.

This gives us more time to work out the alternative and also people to
migrate
2025-10-07 16:30:10 +00:00
James Y Knight
6267e7176d Bazel: fix after "[llvm-driver] Remove llvm-profdata from the driver (#162191)" 2025-10-07 12:02:27 -04:00
Michael Jones
d06c9a6bee [libc][bazel] Add bazel for sys/mman and resource (#161750)
Depends on other cleanup patches:
https://github.com/llvm/llvm-project/pull/161748
https://github.com/llvm/llvm-project/pull/161749
2025-10-06 15:47:19 -07:00
Jordan Rupprecht
087c832de5 [bazel] Port #155026: OptTable support for subcommands (#162150) 2025-10-06 15:22:59 -05:00
Muhammad Bassiouni
596ff855d0 [libc][math] Refactor exp2f implementation to header-only in src/__support/math folder. (#161992)
Part of #147386

in preparation for: https://discourse.llvm.org/t/rfc-make-clang-builtin-math-functions-constexpr-with-llvm-libc-to-support-c-23-constexpr-math-functions/86450
2025-10-06 21:23:44 +03:00
Maksim Levental
84a214856a [MLIR][Python] use FetchContent_Declare for nanobind and remove pybind (#161230)
Inspired by this comment
https://github.com/llvm/llvm-project/pull/157930#issuecomment-3346634290
(and long-standing issues related to finding nanobind/pybind in the
right place), this PR moves to using `FetchContent_Declare` to get the
nanobind dependency. This is pretty standard (see e.g.,
[IREE](cf60359b74/CMakeLists.txt (L842-L848))).
This PR also removes pybind which has been deprecated for almost a year
(https://github.com/llvm/llvm-project/pull/117922) and which isn't
compatible (for whatever reason) with `FetchContent_Declare`.

---------

Co-authored-by: Jacques Pienaar <jpienaar@google.com>
2025-10-06 17:17:04 +00:00
Muhammad Bassiouni
3e78c313bc [libc][math] Refactor exp2 implementation to header-only in src/__support/math folder. (#161297)
Part of #147386

in preparation for: https://discourse.llvm.org/t/rfc-make-clang-builtin-math-functions-constexpr-with-llvm-libc-to-support-c-23-constexpr-math-functions/86450
2025-10-05 06:31:39 +03:00
Yi Zhang
436f9f39cb [bazel] Add missing dep after cf86ef925d (#161884) 2025-10-03 13:40:46 -04:00
Jorge Gorbe Moya
fd9a1dcc01 [bazel] Add missing dep after 99d85906c5 (#161728) 2025-10-02 13:25:52 -07:00
Alexey Samsonov
5f0f4972c4 [libc] Unify and extend no_sanitize attributes for strlen. (#161316)
Fast strlen implementations (naive wide-reads, SIMD-based, and
x86_64/aarch64-optimized versions) all may perform
technically-out-of-bound reads, which leads to reports under ASan,
HWASan (on ARM machines), and also TSan (which also has the capability
to detect heap out-of-bound reads). So, we need to explicitly disable
instrumentation in all three cases.

Tragically, Clang didn't support `[[gnu::no_sanitize]]` syntax until
recently, and since we're supporting both GCC and Clang, we have to
revert to `__attribute__` syntax.
2025-10-01 17:26:22 -07:00
Muhammad Bassiouni
6c032fa600 [libc][math] Refactor exp10m1f16 implementation to header-only in src/__support/math folder. (#161119)
Part of #147386

in preparation for: https://discourse.llvm.org/t/rfc-make-clang-builtin-math-functions-constexpr-with-llvm-libc-to-support-c-23-constexpr-math-functions/86450
2025-10-01 11:21:19 +03:00
Jacques Pienaar
eb420fd669 [mlir][bzl] Fix missing dep (#161126)
Flagged with `-Wprivate-header`.
2025-09-29 05:02:36 +00:00
Muhammad Bassiouni
23d3caf854 [libc][math] Refactor exp10m1f implementation to header-only in src/__support/math folder. (#159897)
Part of #147386

in preparation for: https://discourse.llvm.org/t/rfc-make-clang-builtin-math-functions-constexpr-with-llvm-libc-to-support-c-23-constexpr-math-functions/86450
2025-09-29 07:58:03 +03:00
Jorge Gorbe Moya
5cb1641958 [bazel] Fix build after 0e35f56d40 (#160933) 2025-09-26 19:49:11 +00:00
Maksim Levental
ef5e5ef6dd [MLIR][Bazel] correctly fix bazel build after 59e74a0 (#160539)
https://github.com/llvm/llvm-project/pull/160508 wasn't the correct fix
- the fix just disabled the test because
59e74a0749/mlir/test/Examples/standalone/lit.local.cfg (L18)
is now always `False` (`if not "0"` is always `False`). This PR is the
correct fix.
2025-09-24 16:24:40 +00:00
Bart Chrzaszcz
3be8294bf9 [mlir] Fix bazel after 077a796 round 2. (#160542) 2025-09-24 16:25:57 +01:00
Bart Chrzaszcz
40aac77b7b [mlir] Fix bazel after 077a796. (#160533) 2025-09-24 14:16:55 +00:00
Jordan Rupprecht
816970ba74 [bazel][mlir][Python] Port #159926: move PDLPatternMatch.h.inc (#160432)
```
external/llvm-project/mlir/lib/CAPI/Transforms/Rewrite.cpp:17:10: error: use of private header from outside its module: 'mlir/IR/PDLPatternMatch.h.inc' [-Wprivate-header]
   17 | #include "mlir/IR/PDLPatternMatch.h.inc"
      |          ^
```
2025-09-24 03:14:06 +00:00
Pranav Kant
78b80a15ce [bazel] Add llvm-remarkutil cc_binary (#160379)
This is being used in some tests now such as
[dfbd76bda0](dfbd76bda0 (diff-44281ca7d921d675879d00ac18d544d23029a65f813b1e401459789b4b4ca6f8))
2025-09-23 19:50:29 +00:00
Pranav Kant
95c2ea3abb [bazel] buildifier reformat (#160382) 2025-09-23 12:46:46 -07:00
Pranav Kant
19ffca5557 [bazel] Fix for c31d50378b (#160357) 2025-09-23 13:34:07 -05:00
Bart Chrzaszcz
3a95bf4328 [mlir] Fix bazel after d8b84be #2. (#160271)
Need this as `mlir/dialects/transform/smt.py` imports it:

```py
from .._transform_smt_extension_ops_gen import *
from .._transform_smt_extension_ops_gen import _Dialect
```
2025-09-23 10:36:37 +00:00
Alex Trotta
1ee18959bc Reland "[bazel][mlir][python] Port #155741: stub auto-generation" (#159940)
Relands https://github.com/llvm/llvm-project/pull/157173 (reverts
llvm/llvm-project#157995).

The stubgen was relanded here:
https://github.com/llvm/llvm-project/pull/157930
2025-09-22 15:13:44 -05:00
Maksim Levental
81cbd970cf [MLIR][Python] remove nb::typed to fix bazel build (#160183)
https://github.com/llvm/llvm-project/pull/157930 broke bazel build (see
https://github.com/llvm/llvm-project/pull/157930#issuecomment-3318681217)
because bazel is stricter on implicit conversions (some difference in
flags passed to clang). This PR fixes by moving/removing `nb::typed`.

EDIT: and also the overlay...
2025-09-22 12:55:43 -07:00
Bart Chrzaszcz
e9db38c176 [mlir] Fix bazel after 2bcccdd. (#160081) 2025-09-22 12:08:36 +00:00
Bart Chrzaszcz
7c8b3f34d4 [mlir] Fix bazel after d8b84be. (#160078) 2025-09-22 12:42:47 +01:00
Muhammad Bassiouni
2b937daa13 [libc][math] Refactor dsqrtl implementation to header-only in src/__support/math folder. (#154868)
Part of #147386

in preparation for: https://discourse.llvm.org/t/rfc-make-clang-builtin-math-functions-constexpr-with-llvm-libc-to-support-c-23-constexpr-math-functions/86450
2025-09-20 07:24:21 +03:00
Jordan Rupprecht
dcce216289 [bazel][AArch64] Port #156364: fix tablegen args (#159835)
This was updated in #156364 but `-ignore-non-decodable-operands` was
removed from the wrong tablegen arg list (arm vs aarch64)
2025-09-19 19:17:14 +00:00
Sergei Barannikov
bf835169a5 [AArch64] Remove post-decoding instruction mutations (#156364)
Add `bits<0>` fields to instructions using the ZTR/MPR/MPR8 register
classes. These register classes contain only one register, and it is
not encoded in the instruction. This way, the generated decoder can 
completely decode instructions without having to perform a post-decoding
pass to insert missing operands.

Some immediate operands are also not encoded and have only one possible
value "zero". Use this trick for them, too.

Finally, remove `-ignore-non-decodable-operands` option from
`llvm-tblgen` invocation to ensure that non-decodable operands do not
appear in the future.
2025-09-19 17:15:38 +00:00
Congcong Cai
584af2f89e reapply "[clang-tidy] support query based custom check" (#159547)
reapply #131804 and #159289
Fixed cmake link issue.

---------

Co-authored-by: DeNiCoN <denicon1234@gmail.com>
Co-authored-by: Baranov Victor <bar.victor.2002@gmail.com>
2025-09-19 21:47:57 +08:00
Benjamin Kramer
58a5121ab1 [bazel] Port b59d410202 2025-09-19 12:11:30 +02:00
Ingo Müller
67354837d0 [mlir:python] Port Python bindings of IRDL to bazel build. (#159721)
This PR sets up build rules for the Python bindings of the IRDL dialect
introduced by #158488. The absence of them does not break the bazel
build but some downstream users rely on them.

Signed-off-by: Ingo Müller <ingomueller@google.com>
2025-09-19 11:02:30 +02:00
Jordan Rupprecht
da71e3c76d [bazel][mlir] Port #158722: complex.powi op (#159691) 2025-09-19 02:21:16 +00:00
Jordan Rupprecht
b26b40b223 [bazel][mlir] Port #158084: xegpu vectorlinearize pass (#159690) 2025-09-19 02:04:11 +00:00
Alexey Samsonov
5a402aca3f [libc][bazel] Add Bazel rules for rand/srand functions. (#159617)
These functions are unlikely to be used in the overlay mode (since they are stateful), but it's worth verifying the correctness of underlying RNG (which may be reused in other places) in Bazel build regardless.
2025-09-18 14:02:44 -07:00
Jordan Rupprecht
de9a50a8a4 [bazel][mlir] Port #155951: amdgpu dialect deps (#159633) 2025-09-18 19:45:12 +00:00
Michael Jones
b7f0bb9c29 [libc][bazel] Add (v)asprintf targets and tests (#159476) 2025-09-18 10:17:57 -07:00
lntue
5f76369997 [libc][math] Update test/src/math/smoke/FmaTest.h to not rely on compiler runtime. (#159503) 2025-09-18 02:34:47 -04:00
Alexey Samsonov
b6e440b3a3 [libc][bazel] Add BUILD rules for fma and fmaf functions. (#159502)
This change adds the capability to build fma/fmaf with Bazel (fmal,
fmaf128 variants are not implemented yet), and run smoke tests.

BUILD rules for regular MPFR-based tests will be added later, since they
require support for building rand/srand as well, which is missing in
Bazel for now.
2025-09-17 21:52:30 -07:00
cmtice
53e9d31fd4 [libc] Add missing bazel dependency for __support_math_rsqrt16 (#159473) 2025-09-17 16:03:41 -07:00
Ingo Müller
2bf62e7671 Revert "[clang-tidy] Fix bazel build after #131804 (lazy style)." (#159382)
Reverts llvm/llvm-project#159289.

This is a fix for #131804, which is being reverted.
2025-09-17 19:01:01 +02:00