Commit Graph

2350 Commits

Author SHA1 Message Date
Benjamin Kramer
8bb100b940 [bazel] Add missing dependencies for d4efc3e097 2024-10-14 20:54:31 +02:00
Benjamin Kramer
b2cac3babd [bazel] Add missing dependency for 58d97034c9 2024-10-13 12:58:36 +02:00
Jacques Pienaar
4c25a538d3 [mlir] Start rewrite tool (#77668)
Initial commit of a tool to help in textual rewrites of .mlir files.
This tool builds of of AsmParserState and is rather simple. Took some
inspiration from when I used clang's AST rewrites where I'd often treat
it as a "localizing" regex applicator in fallback cases, and started
with that as functionality. There though, one does have access to the
lower level info than here, but still a step up over sed over entire
file.

This aims to be helpful (e.g., rewrite syntax including best effort
inside comments) rather than bulletproof tool. It may even be better
suited under utils than tools. And most of the rewrites would be rather
short lived and might never make it upstream (while the helpers of those
rewrites may for future rewrites).

The layering at the moment is not ideal as it is reusing the
RewriteBuffer class from clang's rewrite engine. So only optionally
enabling where clang is also enable. There doesn't seem to be anything
clang specific there (the dep does pull in more dependencies than ideal,
but leaving both refactorings).

Additionally started it as a single file to prototype more easily,
planning to refactor later to include and libs for out of file usage.
2024-10-12 15:10:34 -07:00
Keith Smiley
24ac6cf4f7 [bazel] Port 58d97034c9 (#112064) 2024-10-11 18:10:38 -07:00
Keith Smiley
0add1741d5 [bazel] Port e9c8f75d45 (#111928) 2024-10-10 16:55:41 -07:00
Keith Smiley
6640dac22b [bazel] Add include-cleaner tests (#111924) 2024-10-10 16:43:29 -07:00
Keith Smiley
ba530e6b64 [bazel] Add initial clang-doc config (#111779) 2024-10-10 11:42:23 -07:00
Mikhail Goncharov
c15611a697 [bazel] port dc85d5263e 2024-10-10 08:32:15 +02:00
Jorge Gorbe Moya
756ec99c36 [SandboxVec] Re-land "Use sbvec-passes flag to create a pipeline of Region passes after BottomUpVec. (#111223)" (#111772)
https://github.com/llvm/llvm-project/pull/111223 was reverted because of
a build failure with `-DBUILD_SHARED_LIBS=on`.

The Passes component depends on Vectorizer (because PassBuilder needs to
be able to instantiate SandboxVectorizerPass). This resulted in CMake
doing this

1. when it builds lib/libLLVMVectorize.so.20.0git it adds
lib/libLLVMSandboxIR.so.20.0git to the command line, because it's listed
as a dependency (as expected)
2. when it's trying to build lib/libLLVMPasses.so.20.0git it adds
lib/libLLVMVectorize.so.20.0git to the command line, because it's listed
as a dependency (also as expected). But not libLLVMSandboxIR.so.

When SandboxVectorizerPass has its ctors/dtors defined inline, this
caused "undefined reference to vtable" linker errors. This change works
around that by moving ctors/dtors out of line.

Also fix a bazel build problem by adding the new
`llvm/lib/Transforms/Vectorize/SandboxVectorizer/Passes/PassRegistry.def`
as a textual header in the Vectorizer target.
2024-10-09 18:00:17 -07:00
Mikhail Goncharov
f59b151f09 [bazel] port 8e2ccdc4de 2024-10-09 15:51:52 +02:00
Mikhail Goncharov
1a1de2465d [bazel] update abi-breaking.h.cmake for 3be691651a 2024-10-09 11:09:13 +02:00
Mikhail Goncharov
f016e105b3 [bazel] update config.h.cmake
for 84088d3a28
2024-10-09 11:02:30 +02:00
Guillaume Chatelet
dda107b8cb Revert "[libc][bazel] Enable software prefetching for memcpy" (#111370)
Reverts llvm/llvm-project#108939

When `AVX` is available but `-mprefer-vector-width=128` some of the
`mov` instructions turn into the x86 `rep;movsb` instruction leading to
poor performance on "old" architectures (sandybridge, haswell). The
possible solutions are : get rid of the `-mprefer-vector-width` option
or use smaller static copy sizes in
`inline_memcpy_x86_sse2_ge64_sw_prefetching`. Right now a copy size of 3
cache lines (192B) relying exclusively on xmm registers gets turned into
`rep;movsb`.
2024-10-07 15:00:31 +02:00
Mikhail Goncharov
d926e340b7 [bazel] port 9144fed31b 2024-10-07 11:02:47 +02:00
Benoit Jacob
dd04cf0c9d MLIR BUILD.bazel: fold BasicPtxBuilderInterface into NVVMDialect (#111172)
While doing an integrate into downstream
https://github.com/iree-org/iree, I ran into a typical Bazel error with
`BasicPtxBuilderInterface.cpp` including `NVVMDialect.h` which was not
exposed as a header by a declared dependency. I tried fixing this the
straightforward way, by letting `:BasicPtxBuilderInterface` depend on
`:NVVMDialect` , but that caused another Bazel error: circular
dependency between these two targets, as `:NVVMDialect` was already
depending on `:BasicPtxBuilderInterface`. I tried breaking that circle
by dropping the latter dependency, but it was a real dependency in the
code, specifically in the TableGen-generated code. So in the end it
seems that these two targets just need to be fused, which this PR does.

Signed-off-by: Benoit Jacob <jacob.benoit.1@gmail.com>
2024-10-04 12:13:06 -04:00
Danial Klimkin
53b3c9e408 [bazel] Fix libc/hdr past c63112a911 (#111135) 2024-10-04 13:21:25 +02:00
Alexey Samsonov
ec06471c83 Stop disabling link_llvmlibc feature in libc_test Bazel rule
This detail is not relevant for the upstream Bazel version. llvm-libc unit tests today directly invoke the function under test using the namespace, which reduces the potential problems of linking with some other (system-provided) version of llvm-libc further.
2024-10-03 22:40:30 -07:00
Keith Smiley
61f8a7f618 [bazel] Port 4f0ad8d80a (#111034) 2024-10-03 11:00:15 -07:00
Danial Klimkin
82f5acfbec [bazel] Fix build past 2026501cf1 (#110991) 2024-10-03 14:57:45 +02:00
Danial Klimkin
3736ef0da8 [bazel] Fix build past aec87a2143 (#110967) 2024-10-03 09:41:00 +02:00
Christopher Di Bella
41eb186fbb adds missing header, removes Bazel unnecessary dependency (#110932)
The missing header is necessary to keep building with Bazel happy, and the dependency was erroneously added.
2024-10-02 15:12:42 -07:00
Benoit Jacob
d24fdcecbb Bazel: Add vector dialect dependency. (#110927)
Following up on https://github.com/llvm/llvm-project/pull/110904.

Signed-off-by: Benoit Jacob <jacob.benoit.1@gmail.com>
2024-10-02 17:00:05 -04:00
Christopher Di Bella
405f8a11d4 adds missing bazel dependencies (#110904) 2024-10-02 14:24:22 -05:00
Danial Klimkin
391e64c518 [bazel] Fix lldb build past 87121403e2 (#110833) 2024-10-02 14:17:18 +02:00
Danial Klimkin
eb6222b9ea [bazel] Fix build past 66f84c8b8a (#110830) 2024-10-02 14:01:19 +02:00
Danial Klimkin
7537142e88 [bazel] Fix build past 4e2efea5e8 (#110799) 2024-10-02 10:19:53 +02:00
Keith Smiley
e7edd53e2d [bazel] Port c63112a911 (#110706) 2024-10-01 10:34:43 -07:00
Danial Klimkin
9ad5573825 [bazel] Fix build past 00128a20ee (#110629) 2024-10-01 08:01:57 +02:00
NAKAMURA Takumi
27a8f00b22 [Bazel] Fixup for #110538, Rename SandboxIRValues.def to Values.def 2024-10-01 07:29:33 +09:00
Danial Klimkin
dd2792ac7d [bazel] Fix build past 6292f117c3 (#110459) 2024-09-30 09:46:41 +02:00
Keith Smiley
d30d25196c [bazel] Port f597ce03a6 (#110396) 2024-09-28 18:52:53 -07:00
Keith Smiley
8cd2f75173 [bazel] Port df4d7d3b29 (#110395) 2024-09-28 18:45:15 -07:00
hanhanW
3d715e1fe1 Revert "[Bazel] Port 5e9813667958688f5ab0e0b776b509b2b909d1e4"
This reverts commit bf25ecb6ca.
2024-09-27 15:21:52 -07:00
Keith Smiley
9c7c63cdf0 [bazel] Fix mlir build (#110293) 2024-09-27 09:23:03 -07:00
Dmitry Chernenkov
c6747335b4 [Bazel] Port 7dfdca1961 2024-09-27 16:20:00 +00:00
Dmitry Chernenkov
bf25ecb6ca [Bazel] Port 5e98136679 2024-09-27 15:30:09 +00:00
Jorge Gorbe Moya
a82fd981d8 [bazel][SandboxIR] Add cc_test rule for SandboxIR tests. (#110184) 2024-09-26 16:18:14 -07:00
Walter Lee
1eecc1346a [mlir] NFC: Fix layering check / parse headers violations (#110117)
Those tools check strict dependency and standalone headers in Google,
but some internal build optimizations caused some violations not to be
detected. This change adds a missing dependency, and includes some types
that are needed for template instantiation.
2024-09-26 18:30:52 -04:00
norx1991
ac2a2816e3 Fix BUILD.bazel error (#110172) 2024-09-26 16:24:59 -05:00
norx1991
d1297638a3 Update BUILD.bazel (#110170)
It was broken by https://github.com/llvm/llvm-project/pull/100667
2024-09-26 16:09:36 -05:00
Dmitry Chernenkov
850ee790cf [Bazel] Port fa824dc0dd 2024-09-25 08:32:55 +00:00
Keith Smiley
470e5afe69 [bazel] Port f586b1e3f4 (#109908) 2024-09-24 22:35:50 -07:00
Michael Jones
aeb18ebbe0 [libc] Add MSAN unpoison annotations to recv funcs (#109844)
Anywhere a struct is returned from the kernel, we need to explicitly
unpoison it for MSAN. This patch does that for the recv, recvfrom,
recvmsg, and socketpair functions.
2024-09-24 14:54:02 -07:00
lntue
fa17977c31 [libc][bazel] Remove specializations from libc_math_function. (#109802)
There are no more specializations `libc/src/math/x86_64` or
`libc/src/math/aarch64` anymore. All implementations are going through
the generic implementation.
2024-09-24 11:26:06 -04:00
Dmitry Chernenkov
3ec5e74c0d [Bazel] Fix layering for 127349fcba 2024-09-24 13:00:12 +00:00
Dmitry Chernenkov
30dbbdd2ea [Bazel] Fix for 127349fcba 2024-09-24 09:18:22 +00:00
OverMighty
127349fcba [libc][math] Add floating-point cast independent of compiler runtime (#105152)
Fixes build and tests with compiler-rt on x86.
2024-09-23 19:35:39 +02:00
Dmitry Chernenkov
8b4b7d28f7 [Bazel] additional fix for 65bc259a97 2024-09-23 08:21:58 +00:00
Keith Smiley
ccff6cc3b3 [bazel] Port 65bc259a97 (#109458) 2024-09-20 12:14:08 -07:00
Benjamin Kramer
8db97ae36c Revert "[bazel] Port 64972834c193632cbc47e54c0f0c721636b077e6"
This reverts commit d3532d1b67.

The change this adapter for bazel was reverted in 9c5ad62e74
2024-09-20 18:24:21 +02:00