2419 Commits

Author SHA1 Message Date
Jordan Rupprecht
f50ca2e8a6
[bazel] Remove more references to ARCMigrate (#125027)
c4a019747c98ad9326a675d3cb5a70311ba170a2 removed arc_migrate targets but
accidentally left a few references to the now deleted target. Remove
those.
2025-01-29 23:25:48 -06:00
Sirraide
c4a019747c
[Clang] Remove ARCMigrate (#119269)
In the discussion around #116792, @rjmccall mentioned that ARCMigrate
has been obsoleted and that we could go ahead and remove it from Clang,
so this patch does just that.
2025-01-30 05:32:25 +01:00
Benjamin Kramer
d444558f51 [bazel] Port 25ae1a266d50f24a8fffc57152d7f3c3fcb65517 2025-01-29 18:14:51 +01:00
NAKAMURA Takumi
267e293510 [bazel] Introduce MAX_CLANG_ABI_COMPAT_VERSION (for #123998) 2025-01-29 16:46:33 +09:00
Jorge Gorbe Moya
3a1e157454 [bazel] More fixes for 35df525fd00c2037ef144189ee818b7d612241ff
I missed a couple spots in my previous attempt to fix the build
(4eb7c349a616827a3ec9bea57718516409103caa).
2025-01-28 14:49:24 -08:00
Jorge Gorbe Moya
4eb7c349a6 [bazel] Fix build after 35df525fd00c2037ef144189ee818b7d612241ff 2025-01-28 14:33:07 -08:00
Jorge Gorbe Moya
b108fbe6ea [bazel] Fixes for 7f37b34, 0165e33 and 3c64f86 2025-01-28 10:42:46 -08:00
Jordan Rupprecht
431024506c
[bazel] Remove DebugInfo files covered by more specific targets (#124138)
For example, `include/llvm/DebugInfo/DWARF/DWARFContext.h` is included
as part of both the generic "DebugInfo" target as well as the specific
"DebugInfoDWARF" target. It should only be in one. Tooling that manages
build dependencies should be more accurate now.
2025-01-28 06:07:31 -06:00
NAKAMURA Takumi
d69b785733 [bazel] Add Builtins for #122873(NVPTX) and #123460(Hexagon) 2025-01-28 18:58:00 +09:00
Jorge Gorbe Moya
d606f68a2e [bazel] Fix build after e0c7f081f1582d49f81ec4c6cdbf5d6ef13c58ba 2025-01-27 21:42:40 -08:00
Benjamin Kramer
658f8500c8 [bazel] Remove obsolete mlir-cpu-runner alias 2025-01-27 18:38:12 +01:00
Benjamin Kramer
77c780d64b [bazel] Port eb206e9ea84eff0a0596fed2de8316d924f946d1
Leave around an alias so users can move at their own pace.
2025-01-24 15:11:54 +01:00
Karlo Basioli
0510d4ea59
[bazel]Fix bazel build after 631a6e0004e57ca85569b99ea411418627925697 2025-01-24 10:40:48 +01:00
Benjamin Kramer
3ed28bbf19 [bazel] Generate CXX11AttributeInfo.inc for 4018317407006b2c632fbb75729de624a2426439 2025-01-23 22:13:46 +01:00
Jordan Rupprecht
d17e4ca7e0
[bazel][NFC] Add td_library for downstream use (#124156)
This will allow td_library/gentbl_cc_library in other packages to use
these td files.
2025-01-23 13:23:51 -06:00
Oleksandr T.
4018317407
[Clang] restrict use of attribute names reserved by the C++ standard (#106036)
Fixes #92196

https://eel.is/c++draft/macro.names#2
> A translation unit shall not #define or #undef names lexically
identical to keywords, to the identifiers listed in Table
[4](https://eel.is/c++draft/lex.name#tab:lex.name.special), or to the
[attribute-token](https://eel.is/c++draft/dcl.attr.grammar#nt:attribute-token)s
described in [[dcl.attr]](https://eel.is/c++draft/dcl.attr), except that
the names likely and unlikely may be defined as function-like macros
([[cpp.replace]](https://eel.is/c++draft/cpp.replace))[.](https://eel.is/c++draft/macro.names#2.sentence-1)
2025-01-23 21:16:59 +02:00
Danial Klimkin
4d3a530924
[bazel]Fix(2) bazel build past 2e6cc79f816d942ab09d6a310cd925c1da148aa9 (#124118)
Fix caused link errors downstream.
2025-01-23 15:21:33 +01:00
Danial Klimkin
0c66644270
[bazel]Fix bazel build past 2e6cc79f816d942ab09d6a310cd925c1da148aa9 (#124112)
Split target under LLVMIR/Transforms to avoid deps loop.
2025-01-23 14:20:11 +01:00
Fangrui Song
58c6d440f8
[CMake] Remove HAVE_DLFCN_H and HAVE_DLADDR (#123879)
It is sufficient to just use `HAVE_DLOPEN`.
2025-01-22 08:15:10 -08:00
NAKAMURA Takumi
ec0958c0b7 [bazel] Reorder targets 2025-01-22 09:03:46 +09:00
NAKAMURA Takumi
68fdc09eb5 [bazel] Add SPIRV 2025-01-22 09:03:45 +09:00
Danial Klimkin
b7abc510c5
[bazel]Fix bazel build past e7e3c45bc70904e24e2b3221ac8521e67eb84668 (#123780) 2025-01-21 18:00:59 +01:00
Benjamin Kramer
0f8297ae0b [bazel] Fix dependencies for 69d3ba3db922fca8cfc47b5f115b6bea6a737aab 2025-01-20 11:46:44 +01:00
Tomer Solomon
c0055ec434
[mlir][EmitC] Add MathToEmitC pass for math function lowering to EmitC (#113799)
This commit introduces a new MathToEmitC conversion pass that lowers
selected math operations from the Math dialect to the emitc.call_opaque
operation in the EmitC dialect.

**Supported Math Operations:**
The following operations are converted:

- math.floor -> emitc.call_opaque<"floor">
- math.round -> emitc.call_opaque<"round">
- math.exp -> emitc.call_opaque<"exp">
- math.cos -> emitc.call_opaque<"cos">
- math.sin -> emitc.call_opaque<"sin">
- math.acos -> emitc.call_opaque<"acos">
- math.asin -> emitc.call_opaque<"asin">
- math.atan2 -> emitc.call_opaque<"atan2">
- math.ceil -> emitc.call_opaque<"ceil">
- math.absf -> emitc.call_opaque<"fabs">
- math.powf -> emitc.call_opaque<"pow">

**Target Language Standards:**
The pass supports targeting different language standards:

- C99: Generates calls with suffixes (e.g., floorf, fabsf) for
single-precision floats.
- CPP11: Prepends std:: to functions (e.g., std::floor, std::fabs).

**Design Decisions:**
The pass uses emitc.call_opaque instead of emitc.call to better emulate
C-style function overloading.
emitc.call_opaque does not require a unique type signature, making it
more suitable for operations like <math.h> functions that may be
overloaded for different types.
This design choice ensures compatibility with C/C++ conventions.
2025-01-20 09:26:41 +01:00
Jorge Gorbe Moya
3065cf238c
[bazel] Remove //clang:basic_internal_headers target (NFC) (#123230)
This target exists to allow `#include "Header.h"` for headers in
lib/Basic rather than using file-relative inclusion. This is rather
hacky and results in having two targets that claim the same headers.

Instead, we can pass a `-I` flag in the `copts` for //clang:basic, to
adjust the include path to keep those `#include "Header.h"` directives
working. There are other targets in this file already doing a similar
thing for generated files.
2025-01-17 09:34:23 -08:00
Benjamin Kramer
0d7c8c0e29
[bazel] Add new file added in 437834e16be6d04e7b198dad8a42d507770251a1 2025-01-17 12:07:52 +01:00
Fangrui Song
414980d061
[CMake] Remove HAVE_SYS_RESOURCE_H/HAVE_SETRLIMIT/HAVE_GETRLIMIT
Only used by Unix/Program.inc and seem always available.

Pull Request: https://github.com/llvm/llvm-project/pull/123288
2025-01-16 22:44:54 -08:00
Fangrui Song
219beb7aca [CMake] Remove HAVE_SYS_IOCTL_H 2025-01-16 21:52:01 -08:00
Fangrui Song
86a81d424c [CMake] Remove HAVE_TERMIOS_H
The code path has been dead since 2019.
See a3eb3d3d92d037fe3c9deaad87f6fc42fe9ea766
2025-01-16 21:48:27 -08:00
Fangrui Song
f999b11e68
[CMake] Remove some unneeded HAVE_*_H
Pull Request: https://github.com/llvm/llvm-project/pull/123282
2025-01-16 21:37:24 -08:00
Jorge Gorbe Moya
a5bd01e889 [bazel] Exclude lib/Interpreter/Wasm.h from //clang:interpreter
We're currently excluding Wasm.cpp, because it requires emscripten. When
using header modules, Wasm.h gets compiled on its own and it also
requires emscripten, so we need to exclude both.
2025-01-16 16:54:24 -08:00
Jorge Gorbe Moya
4e9f04c5fa [bazel] Remove a couple of unused dependencies 2025-01-16 15:24:53 -08:00
Yijia Gu
a87215bc88 [mlir][test][bazel] add missing deps for TestPass 2025-01-16 13:51:06 -08:00
Jorge Gorbe Moya
842ce4efdd [bazel] Remove useless exclusion from glob (NFC)
The excluded file doesn't match the glob pattern to begin with, so it's
unnecessary.
2025-01-16 11:41:14 -08:00
Jorge Gorbe Moya
4b06b01e62 [bazel] Add missing file to textual_hdrs in //clang:basic (NFC) 2025-01-16 11:13:21 -08:00
Jorge Gorbe Moya
0e417a700f
[bazel] Add rules for clang-fuzzer protobuf-related libraries (#123126)
Also bumped up bazel_skylib to the latest version because the proto
rules were complaining about a missing feature.
2025-01-16 10:12:46 -08:00
Jorge Gorbe Moya
d2d531e097
[clang][Serialization] Stop including Frontend headers from Serialization (NFC) (#123140)
The Frontend library depends on Serialization. This is an explicit
dependency encoded in the CMake target. However, Serialization currently
has an implicit dependency on Frontend, as it includes one of its
headers. This is not reflected in the CMake build rules, but Bazel is
stricter so, in order to avoid a dependency cycle, it hackily declares
the Frontend headers as source files for Serialization.

Fortunately, the only Frontend header used by Serialization is
clang/Frontend/FrontendDiagnostic.h, which is a legacy header that just
includes clang/Basic/DiagnosticFrontend since
d076608d58d1ec55016eb747a995511e3a3f72aa, back in 2018.

This commit changes Serialization to use the underlying header from
Basic instead. Both Serialization and Frontend depend on Basic, so this
breaks the dependency cycle.
2025-01-16 10:12:04 -08:00
Benjamin Kramer
cea41e9f4c [bazel] Port bf17016a92bc8a23d2cdd2b51355dd4eb5019c68 2025-01-15 23:06:16 +01:00
Jorge Gorbe Moya
2bc422dfa7
[bazel] Remove internal headers from hdrs in //clang:format (#122987)
They are already included in `srcs`, as they should be.
2025-01-15 10:31:07 -08:00
Fangrui Song
1e53f9523d
[CMake] Remove some always-true HAVE_XXX_H
These are unneeded even on AIX, PURE_WINDOWS, and ZOS (per #104706)

* HAVE_ERRNO_H: introduced by 1a93330ffa2ae2aa0b49461f05e6f0d51e8443f8 (2009) but unneeded.
  The guarded ABI is unconditionally used by lldb.
* HAVE_FCNTL_H
* HAVE_FENV_H
* HAVE_SYS_STAT_H

Pull Request: https://github.com/llvm/llvm-project/pull/123087
2025-01-15 09:53:21 -08:00
Jorge Gorbe Moya
43f203da89 [bazel] add missing dep 2025-01-14 14:17:31 -08:00
Jerry-Ge
f09db6a3af
[TOSA] Add Tosa_Shape type and ConstShapeOp (#122547)
Adds:
1. tosa shape type to Tosa dialect e.g., !tosa.shape<4> is a type for
rank-4 shape values (size-4 array of index values)
 2. const_shape operator
3. trait TosaShapeOperator, added to tosa shape operators, and a
verifier that all operands and results of operator are tosa shapes
4. trait TosaResolvableShapeOperands, added to all tosa operators, and a
verifier that every tosa shape operand is produced by a tosa shape
operator (indicated by trait TosaShapeOperator)
5. trait TosaShapeOperatorWithSameRanks, added to
Tosa_ElementwiseShapeOp and a verifier that all operands and result
shapes have same ranks
5. changed TileOp's multiples from attribute to input, of !tosa.shape
type.
 6. add folder for tosa ConstShape operator

This patch was originally authored by Tai Ly <tai.ly@arm.com>

Signed-off-by: Jerry Ge <Jerry.Ge@arm.com>
Signed-off-by: Tai Ly <tai.ly@arm.com>
2025-01-14 13:41:08 -08:00
Jorge Gorbe Moya
6e14f9b40e
[bazel] minor formatting fixes (#122964)
Added `# keep sorted` to a couple of long-ish lists of files that
buildifier didn't automatically sort by default.

Changed a couple of one-element `toolchains` attributes to the
single-line format.
2025-01-14 13:27:50 -08:00
Jorge Gorbe Moya
68c9826534 [bazel] add missing dep to //clang:static_analyzer_core_options 2025-01-14 12:18:31 -08:00
Jorge Gorbe Moya
31e9d390c0
[bazel] remove unneeded copts (#122958) 2025-01-14 11:44:22 -08:00
Jorge Gorbe Moya
5a3b5ca058
[bazel] Add targets for some testing utility binaries/libraries. (#122834) 2025-01-14 10:19:50 -08:00
Jorge Gorbe Moya
82aac16ddd [bazel] Remove obsolete exclusion from glob.
lib/Tooling/NodeIntrospection.cpp was deleted in commit
371eccd5dfed88c8e76449233d8388c12be3464b so excluding it from the glob
does nothing.
2025-01-10 18:19:26 -08:00
Benjamin Kramer
d797d94185 [bazel] Port 0aa831e0edb1c1deabb96ce2435667cc82bac79b 2025-01-09 21:39:14 +01:00
Benjamin Kramer
f791a4f19f [bazel] Add missing dependency for cbcb7ad32e6faca1f4c0f2f436e6076774104e17 2025-01-09 21:38:29 +01:00
Benjamin Kramer
c3d1a50d6a [bazel] Add missing dependency for b79ed8729b3d6d5482481c41a7de2cd75b0f61df 2025-01-09 13:22:02 +01:00