Commit Graph

1776 Commits

Author SHA1 Message Date
Mircea Trofin
123c83ddc7 [mlgo] bazel rules for mlgo-utils (#79217)
Akin the `py_binary` rules for `lit`, these are scoped to binaries,
rather than exposing the library - binary split. The latter is available
to the package (pip package) users.

Tested:

```
cd utils/bazel
bazel build @llvm-project//llvm:extract_ir
bazel-bin/external/llvm-project/llvm/extract_ir --help
```
...and observed expected output (rather than import not found errors)

(Same for the other 2 targets).
2024-01-24 11:04:06 -08:00
Nico Weber
3135984024 Reland "[CMake/Bazel] Support usage of opt driver as a library (#79205)"
This reverts commit be08be5d5d.
The build error was due to a different change, apologies!
2024-01-24 13:57:07 -05:00
Nico Weber
be08be5d5d Revert "[CMake/Bazel] Support usage of opt driver as a library (#79205)"
This reverts commit 32f7922646.

Doesn't build, see
https://github.com/llvm/llvm-project/pull/79205#issuecomment-1908730527
2024-01-24 13:52:10 -05:00
William Moses
32f7922646 [CMake/Bazel] Support usage of opt driver as a library (#79205)
In Bazel, Clang current separates the clang executable into a
clang-driver library, and the actual clang executable. This allows
downstream users to make their own variations of clang, without having
to redo/maintain separate build pipelines.

This adds the same for opt for both CMake and Bazel.
2024-01-24 13:39:27 -05:00
Christian Sigg
4079aab8d8 [llvm][bazel] Fix BUILD 2024-01-24 17:36:37 +01:00
Christian Sigg
611843d24b [llvm][bazel] Fix BUILD. 2024-01-24 17:31:27 +01:00
Danial Klimkin
56aa77e119 Fix bazel build past 4a58284559 (#79318)
and keep things sorted.
2024-01-24 17:17:17 +01:00
Christian Sigg
8d43dad9b8 [clang][bazel] Fix BUILD after 4a58284559. 2024-01-24 16:54:22 +01:00
Christian Sigg
31f41f0984 [clang][bazel] Fix BUILD after 4a58284559. 2024-01-24 16:36:34 +01:00
Danial Klimkin
d1b473c795 Fix bazel build past 7251243315 (#79282)
Fix bazel build past 7251243315
2024-01-24 14:06:14 +01:00
Adrian Kuegel
34466019e7 [mlir][Bazel] Add missing dependency after 750e90e440 2024-01-24 08:20:08 +00:00
Anlun Xu
d922c82447 [Blaze] Fix build file 2024-01-22 15:45:04 -08:00
Nick Desaulniers
1d5c16d780 [libc] default enable -ftrivial-auto-var-init=pattern (#78776)
Usage of uninitialized memory is a top memory safety issue in C++ codebases.
Help mitigate this somewhat by default initialize stack allocations to a
pattern (0xAA repeating).

Clang has received optimizations to sink these into control flow paths that
access such values to minimize the overhead of these added initializations.

If there's a measurable slowdown, we can add
-ftrivial-auto-var-init-max-size=<N> for some value N bytes if we have any
large stack allocations, or add attribute uninitialized to any variable
declarations.

Unsupported until GCC 12.1 / Clang 8.

Increases file size of libc.a from a full build by +8.79Ki (+0.2%).
2024-01-22 14:55:51 -08:00
Matthew Devereau
312acdfae1 [AArch64][SME] Take arm_sme.h out of draft (#78961) 2024-01-22 17:12:16 +00:00
Christian Sigg
cc38cff05c [mlir][bazel] Fix BUILD after 9f7fff7f13. 2024-01-22 11:39:48 +01:00
Jeremy Kun
ddad7e3097 [mlir][amdgpu] Fix bazel build (#78820)
Broken by
b7360fbe8c
2024-01-19 16:31:08 -08:00
Jeremy Kun
76ffa8f63a [mlir][transform]: fix broken bazel build for TensorTransformOps (#78766) 2024-01-19 20:33:36 +01:00
Jeremy Kun
2521e9785d [mlir][transform]: fix broken bazel build (#78757)
Broken by
42b160356f
2024-01-19 19:55:43 +01:00
Guillaume Chatelet
508c6aa8f3 [libc][NFC] Fix "type qualifiers ignored on cast result type" GCC warning (#78509)
GCC complains about "type qualifiers ignored on cast result type".
Upon investigation the correct fix was to remove all `volatile` and use the `-frounding-math` option.
2024-01-19 09:27:03 +01:00
denglesberg-splunk
3b54337be5 Replace exec_tools with tools in bazel genrule. (#77510)
As of the Bazel 6.x series, there is no difference between the
`exec_tools` and `tools`. Bazel 7 removes the `exec_tools` attribute
entirely. This commit updates to use the cannonical attribute name to
allow building `clang-tidy``with bazel 7.0.0, though it does not change
the default bazel version which remains at 6.1.2.

See also https://github.com/bazelbuild/bazel/issues/19132 for more
information.
2024-01-19 09:12:54 +01:00
Guillaume Chatelet
5ddd7bc38c [reland][libc][NFC] Refactor FPBits and remove LongDoubleBits specialization (#78465)
- [reland] #78192 
- [reland] #78447 
- Turn `as` static function into a `to_storage_type` member function.
2024-01-17 17:38:48 +01:00
Dmitry Chernenkov
58564ddf5c [bazel]Sort loads in llvm/BUILD.bazel 2024-01-17 16:04:40 +00:00
Guillaume Chatelet
d8627cb138 Revert "[reland][libc][NFC] Refactor FPBits and remove LongDoubleBits specialization" (#78457)
Reverts llvm/llvm-project#78447
This broke the gcc buildbot.
2024-01-17 16:50:52 +01:00
Guillaume Chatelet
cab041fe63 [reland][libc][NFC] Refactor FPBits and remove LongDoubleBits specialization (#78447)
- [reland] #78192
- Make the implementation work when `__uint128_t` is not available on
the plaftorm.
2024-01-17 16:15:09 +01:00
Pranav Kant
8371cdca12 Disable ConstraintSystemTest for now
as it started failing after 8e514c572e

Above commit enables llvm::DebugFlag which is a global variable.
2024-01-17 04:04:16 +00:00
Nick Desaulniers
337b771592 Revert "[libc][NFC] Refactor FPBits and remove LongDoubleBits specialization (#78192)" (#78329)
This reverts commit fdbf255c96.

Causes build breakage on 32b arm (see reports:
https://github.com/llvm/llvm-project/pull/78192).

These are reproducible for the 32b arm baremetal target on x86 hosts as
well.
2024-01-16 12:09:58 -08:00
Dmitry Chernenkov
a63d7872f0 Revert "[bazel][llvm] Sort load statements"
This reverts commit a9bfad2b9b.
2024-01-16 15:03:24 +00:00
Guillaume Chatelet
fdbf255c96 [libc][NFC] Refactor FPBits and remove LongDoubleBits specialization (#78192)
This patch removes the `FPBits` specialization for x86 Extended Precision by moving it up to `FPRep`.
It also introduces enums (`Exponent`, `BiasedExponent` and `Significand`) to represent the exponent and significant parts of the floating point numbers. These enums are used to construct and observe floating point representations.

Additionally, we remove `LongDoubleBits.h` that is now unnecessary.
2024-01-16 15:41:40 +01:00
Dmitry Chernenkov
a9bfad2b9b [bazel][llvm] Sort load statements 2024-01-16 14:15:52 +00:00
Dmitry Chernenkov
076eb4c79e [bazel] Add dependencies for 8e514c572e 2024-01-16 11:19:25 +00:00
Christian Sigg
af9f2dc7fd [bazel] Fix build after 9fa9d9a7e1 2024-01-16 08:22:50 +01:00
Christian Sigg
2c2b27c0ea [bazel] Fix build after 9fa9d9a7e1 2024-01-16 08:20:38 +01:00
Christian Sigg
5f24e77942 [bazel] Fix build after 9fa9d9a7e1 2024-01-16 08:03:34 +01:00
Benjamin Kramer
baba0a4cb4 [bazel] Port 8e7f073eb4 2024-01-15 13:11:51 +01:00
Adrian Kuegel
e040252b54 [mlir][Bazel] Add missing dependency needed after a1eaed7a21 2024-01-15 06:52:15 +00:00
Emilio Cota
85b7d54385 [bazel] fix for 5417a5fed6 2024-01-12 14:06:32 -05:00
Alex Zinenko
108bedee44 [mlir] fix bazel 2024-01-12 16:59:33 +00:00
Alex Zinenko
b32001a232 [mlir] update bazel for transform debug extension 2024-01-12 13:53:14 +00:00
Adrian Kuegel
528cd28de8 [mlir][Bazel] Adjust BUILD file for aa2a96a24a 2024-01-12 07:17:42 +00:00
Guillaume Chatelet
1ee93ac099 [libc] Add memcmp / bcmp fuzzers (#77741) 2024-01-11 11:06:46 +01:00
Benjamin Kramer
fb1523e712 [bazel] Port 79aa776267 2024-01-10 17:41:22 +01:00
Benjamin Kramer
c19995e965 [bazel] Fix compiler-rt build after 07c9189fcc 2024-01-09 17:53:25 +01:00
Matthias Springer
124efcaa97 [mlir][bufferization][NFC] Clean up Bazel build files (#77429)
`*OpsIncGen` should depend only on the respective `*OpsTdFiles`.
2024-01-09 11:27:48 +01:00
Mikhail Goncharov
243a5822f6 [bazel] update build for 2357e899cb 2024-01-09 10:24:32 +01:00
Adrian Kuegel
3d688d4e3d [mlir][Bazel] Adjust BUILD.bazel file for b43c50490c 2024-01-09 07:45:55 +00:00
Haojian Wu
b2246cf73e Bazel port for a5902a4d24 2024-01-06 10:20:06 +01:00
NAKAMURA Takumi
241e4c7466 [Bazel] Fixup for #77008 (orc::SymbolMap) 2024-01-06 13:43:02 +09:00
Jordan Rupprecht
8d6784db04 [bazel][libc][math] Add missing nan(f|l) deps
After 0504e93288
2024-01-05 11:07:42 -08:00
Nishant Mittal
0504e93288 [libc][math] Implement nan(f|l) functions (#76690)
Specification: https://en.cppreference.com/w/c/numeric/math/nan
2024-01-05 08:23:23 -05:00
Christian Sigg
202a4c0dfb [mlir][bazel] Fix BUILD after 6ae7f66ff5 2024-01-04 13:17:20 +01:00