15304 Commits

Author SHA1 Message Date
bd1976bris
6520b21ce0
[DTLTO][LLVM] Integrated Distributed ThinLTO (DTLTO) (#127749)
This patch adds initial support for Integrated Distributed ThinLTO
(DTLTO) in LLVM, which manages distribution internally during the
traditional link step. This enables compatibility with any build
system that supports in-process ThinLTO. In contrast, existing
approaches to distributed ThinLTO, which split the thin-link
(--thinlto-index-only), backend compilation, and final link into
separate steps, require build system support, e.g. Bazel.

This patch implements the core DTLTO mechanism, which enables
delegation of ThinLTO backend jobs to an external process (the
distributor). The distributor can then manage job distribution through
systems like Incredibuild. A generic JSON interface is used to
communicate with the distributor, allowing for the creation of new
distributors (and thus integration with different distribution
systems) without modifying LLVM.

Please see llvm/docs/dtlto.rst for more details.

RFC: https://discourse.llvm.org/t/rfc-integrated-distributed-thinlto/69641
Design Review: https://github.com/llvm/llvm-project/pull/126654
2025-05-23 20:07:53 +01:00
Nico Weber
01cb390efd [gn] follow up to CLANG_DOC_TEST_ASSET_DIR
Left a comment here:
https://github.com/llvm/llvm-project/pull/138062#issuecomment-2905045589
2025-05-23 12:35:05 -04:00
Nico Weber
d045eb10fc [gn build] Port ed75e2114fd4 2025-05-23 12:35:05 -04:00
Nico Weber
21cbc8ade9 [gn build] Port 9502d1bcb27d 2025-05-23 12:35:05 -04:00
Nico Weber
710ef17b47 [gn build] Port 760bf4f116f9 2025-05-23 12:35:05 -04:00
Nico Weber
7c093ed795 [gn build] Port 58ab005d8db2 2025-05-23 12:35:05 -04:00
Nico Weber
9d103051c9 [gn build] Port 51a03ed27282 2025-05-23 12:35:05 -04:00
Nico Weber
fe09550be1 [gn] port 7dc7c155251 2025-05-23 12:28:08 -04:00
Nico Weber
fd1c4c3431 [gn] port 97dee78eb364 (ClangDocTests config.h) 2025-05-23 09:38:34 -04:00
Nico Weber
eb37abeca1 [gn] port 50127ac054a0 (AttributeSpellingList.inc) 2025-05-23 09:24:38 -04:00
Tim Gymnich
571a24c314
Reland [llvm] add GenericFloatingPointPredicateUtils #140254 (#141065)
#140254 was previously missing 2 files in the bazel build config.
2025-05-22 17:17:02 +02:00
LLVM GN Syncbot
4a158f675b [gn build] Port 95ba5508e5dc 2025-05-22 09:18:06 +00:00
David Green
a2aa88192f
[GlobalISel] Add a update_givaluetracking_test_checks.py script (#140296)
As with the other update scripts this takes the output of
-passes=print<gisel-value-tracking> and inserts the results into an
existing mir file. This means that the input is a lot like
update_analysis_test_checks.py, and the output needs to insert into a
mir file similarly to update_mir_test_checks.py. The code used to do the
inserting has been moved to common, to allow it to be reused. Otherwise
it tries to reuse the existing infrastructure, and
update_givaluetracking_test_checks is kept relatively short.
2025-05-22 09:06:37 +01:00
LLVM GN Syncbot
12c62ebcb2 [gn build] Port c47a5fbb229b 2025-05-21 23:31:34 +00:00
LLVM GN Syncbot
77549b41f1 [gn build] Port d00d74bb2564 2025-05-21 21:53:55 +00:00
LLVM GN Syncbot
e98b095b97 [gn build] Port 793bb6b257fa 2025-05-21 19:20:42 +00:00
LLVM GN Syncbot
878c976c7e [gn build] Port 09c266b75db4 2025-05-21 16:33:07 +00:00
LLVM GN Syncbot
ec9c8e90cc [gn build] Port b263c08e1a0b 2025-05-21 15:15:31 +00:00
Rahul Joshi
b5e3d8ec08
[LLVM][TableGen] Use StringRef for various members CGIOperandList::OperandInfo (#140625)
- Change `Name`, `SubopNames`, `PrinterMethodName`, and
`EncoderMethodNames` to be stored as StringRef.
- Also changed `CheckComplexPatMatcher::Name` to StringRef as a fallout
from the above.

Verified that all the tablegen generated files within LLVM are
unchanged.
2025-05-21 06:23:01 -07:00
Krzysztof Parzyszek
70f9a8163f
[utils][TableGen] Clean up code in DirectiveEmitter (#140772)
Remove most redundant function calls. Unify enum identifier name
generation (via getIdentifierName), and namespace qualification (via
getQualifier).
2025-05-21 07:35:05 -05:00
Ramkumar Ramachandra
bb2791609d
[LAA] Tweak debug output for UTC stability (#140764)
UpdateTestChecks has a make_analyzer_generalizer to replace pointer
addressess from the debug output of LAA with a pattern, which is an
acceptable solution when there is one RUN line. However, when there are
multiple RUN lines with a common pattern, UTC fails to recognize common
output due to mismatched pointer addresses. Instead of hacking UTC scrub
the output before comparing the outputs from the different RUN lines,
fix the issue once and for all by making LAA not output unstable pointer
addresses in the first place.

The removal of the now-dead make_analyzer_generalizer is left as a
non-trivial exercise for a follow-up.
2025-05-21 12:01:49 +01:00
LLVM GN Syncbot
88c4ef2f9f [gn build] Port d561d595c4ee 2025-05-20 23:20:27 +00:00
LLVM GN Syncbot
da62b3eda9 [gn build] Port a9ee8e4a454e 2025-05-20 23:20:26 +00:00
LLVM GN Syncbot
d549abfe00 [gn build] Port 9260d310f1cb 2025-05-20 23:20:25 +00:00
Nico Weber
08b21c87ad [gn] fix mistake in f78a081cdb3 2025-05-20 19:20:08 -04:00
Nico Weber
f78a081cdb [gn] port d561d595c4ee (clang riscv_andes_vector.td) 2025-05-20 19:15:44 -04:00
Arthur Eubanks
11db1285e4 [gn build] Manually port 8f03e1a 2025-05-20 21:09:37 +00:00
Arthur Eubanks
38250ed3b2 [gn build] Manually port a9ee8e4a
Can make these into gn args later if needed.
2025-05-20 18:22:04 +00:00
Krzysztof Parzyszek
46ab684bdd
[utils][TableGen] Unify name qualifications in DirectiveEmitter (#140606)
Remove extraneous qualifications from names when
- the name is explicitly enclosed by corresponding namespaces, and
- the name is in a body of a function defined in corresponding
namespaces. Otherwise add missing qualifications.

This applies to individual sections of TableGen output, and makes name
lookup independent of the context in which these sections are included.
2025-05-20 07:56:59 -05:00
Krzysztof Parzyszek
90539473ec
[utils][TableGen] Remove unused parameter in DirectiveEmitter, NFC (#140605) 2025-05-20 07:56:39 -05:00
Iris Shi
bdf03fcff3
Revert "[llvm][NFC] Use llvm::sort()" (#140668) 2025-05-20 11:27:03 +08:00
Ruiling, Song
b8e5307031
update_mir_test_checks: keep comment embedded in MIR (#140016)
We often add inline comment in mir. It is useful to keep them.
2025-05-20 09:55:18 +08:00
LLVM GN Syncbot
0a718797ea [gn build] Port a53b306c479c 2025-05-19 23:31:10 +00:00
LLVM GN Syncbot
c5191905a8 [gn build] Port dfabd61f7370 2025-05-19 23:04:55 +00:00
Nico Weber
a04cff172f [gn] port 3bae8e2ef2ff0 2025-05-19 17:48:06 -04:00
Kazu Hirata
195e640846 [TableGen] Fix the build
This patch fixes:

  llvm/utils/TableGen/Common/CodeGenRegisters.cpp:653:57: error:
  'getValues' is deprecated: Use getElements instead
  [-Werror,-Wdeprecated-declarations]
2025-05-19 12:34:57 -07:00
Rahul Joshi
29fd76777d
[NFC][TableGen] Create valid Dag in VarLenCodeEmitter (#140283)
- Set the Dag ArgNames correctly when normalizing the Dag for slice.
- Add unit test to exercise the "slice" hi/lo swap case.
2025-05-19 12:27:18 -07:00
Rahul Joshi
3932360b14
[LLVM][TableGen] Rename ListInit::getValues() to getElements() (#140289)
Rename `ListInit::getValues()` to `getElements()` to better match with
other `ListInit` members like `getElement`. Keep `getValues()` for
existing downstream code but mark it deprecated.
2025-05-19 12:16:33 -07:00
Rahul Joshi
0f38543df5
[NFC][TableGen] Use SmallVector range constructor when possible (#140284)
Initialize vectors using constructor instead of llvm::append_range when
possible.
2025-05-19 12:15:43 -07:00
LLVM GN Syncbot
048788419e [gn build] Port ad673151085c 2025-05-19 00:33:08 +00:00
Jessica Clarke
1b41599cf8
[MC][AArch64][ARM][X86] Push target-dependent assembler flags into targets (#139844)
The .syntax unified directive and .codeX/.code X directives are, other
than some simple common printing code, exclusively implemented in the
targets themselves. Thus, remove the corresponding MCAF_* flags and
reimplement the directives solely within the targets. This avoids
exposing all targets to all other targets' flags.

Since MCAF_SubsectionsViaSymbols is all that remains, convert it to its
own function like other directives, simplifying its implementation.

Note that, on X86, we now always need a target streamer when parsing
assembly, as it's now used for directives that aren't COFF-specific. It
still does not however need to do anything when producing a non-COFF
object file, so this commit does not introduce any new target streamers.

There is some churn in test output, and corresponding UTC regex changes,
due to comments no longer being flushed by these various directives (and
EmitEOL is not exposed outside MCAsmStreamer.cpp so we couldn't do so
even if we wanted to), but that was a bit odd to be doing anyway.

This is motivated by Morello LLVM, which adds yet another assembler flag
to distinguish A64 and C64 instruction sets, but did not update every
switch and so emits warnings during the build. Rather than fix those
warnings it seems better to instead make the problem not exist in the
first place via this change.
2025-05-18 20:09:43 +01:00
LLVM GN Syncbot
5247a4fc71 [gn build] Port 3d0c616ce30c 2025-05-18 17:57:46 +00:00
LLVM GN Syncbot
676e660e2d [gn build] Port d84b97ebb3bc 2025-05-17 08:26:20 +00:00
Iris Shi
061a7699f3
[llvm][NFC] Use llvm::sort() (#140335) 2025-05-17 14:49:46 +08:00
Mariusz Kwiczala
85fe4ab8a3
Rename GsymDIContext to GsymContext (#140227)
Renaming based on suggestion here: 
https://github.com/llvm/llvm-project/pull/139686#discussion_r2089538528
2025-05-16 10:18:21 -07:00
Rahul Joshi
7674d6fa9e
[LLVM][TableGen] Simplify DagInit::get (#140056)
- Add `DagInit::get` overloads that do not need ValName to be specified.
- Fix some calls to either not create temporary arrays for DAG args or
use the std::pair<> overload.
2025-05-16 09:45:58 -07:00
LLVM GN Syncbot
36290b7289 [gn build] Port 9c3ab1cfc829 2025-05-16 14:38:55 +00:00
LLVM GN Syncbot
ba631508ae [gn build] Port 910220b84fa1 2025-05-16 13:47:20 +00:00
LLVM GN Syncbot
7028c00f69 [gn build] Port f3f28323adbb 2025-05-16 01:46:14 +00:00
Nico Weber
642d5d74b5 [gn] "port" fc7857ca95bb (CIRUnitTests)
CIRUnitTests depends on mlir, so create a dummy target to make
the sync script happy. (This is behind CLANG_ENABLE_CIR in cmake.)
2025-05-15 19:22:39 -04:00