13737 Commits

Author SHA1 Message Date
Nico Weber
dc456ce4f2 [gn] port 249cf356ef21 2024-02-28 17:35:21 -05:00
Joe Nash
caca8d33a9
[vim] Fix command already exists on opening multiple mir buffers (#82410)
When using the vim syntax for mir, an error occurs in nvim  when opening
multiple .mir buffers. delcommand HiLink in the mir syntax file to avoid
the issue.

To reproduce:
Open an .mir file, for example
llvm/test/Codegen/X86/expand-post-ra-pseudo.mir
Open another mir file from within nvim, for example peephole.mir
```
Error detected while processing function 335[30]..<SNR>43_callback[25]..function 335[30]..<SNR>43_callback:                                                                                                                      
line   23:                                                                                                                                                                                                                       
Vim(command):E174: Command already exists: add ! to replace it: HiLink hi def link <args>   
```
2024-02-28 16:37:39 -05:00
LLVM GN Syncbot
f9b079972c [gn build] Port c6cbf81c84b0 2024-02-28 17:54:20 +00:00
Jason Eckhardt
ad43ea3328
[TableGen] Add support for DefaultMode in per-HwMode encode/decode. (#83029)
Currently the decoder and encoder emitters will crash if DefaultMode is
used within an EncodingByHwMode. As can be done today for
RegInfoByHwMode and ValueTypeByHwMode, this patch adds support for this
usage in EncodingByHwMode:
  let EncodingInfos =
    EncodingByHwMode<[ModeA, DefaultMode], [EncA, EncDefault]>;
2024-02-29 01:47:18 +08:00
LLVM GN Syncbot
5964f4bcf0 [gn build] Port d4cdb516eee4 2024-02-27 22:01:27 +00:00
LLVM GN Syncbot
a76c524adc [gn build] Port f44c3faccaa4 2024-02-27 19:57:18 +00:00
Visoiu Mistrih Francis
b791a51730
[CodeGenSchedule] Don't allow invalid ReadAdvances to be formed (#82685)
Forming a `ReadAdvance` with an entry in the `ValidWrites` list that is
not used by any instruction results in the entire `ReadAdvance` to be
ignored by the scheduler due to an invalid entry.

The `SchedRW` collection code only picks up `SchedWrites` that are
reachable from `Instructions`, `InstRW`, `ItinRW` and `SchedAlias`,
leaving the unreachable ones with an invalid entry (0) in
`SubtargetEmitter::GenSchedClassTables` when going through the list of
`ReadAdvances`
2024-02-26 18:25:21 -08:00
MalaySanghiIntel
3892e8e59c
Non functional change. Initialize var EnumVal to 0. (#82987)
CodeGenInstruction has a new unsigned member EnumVal. It is not
initialized in either the class or the constructor.
2024-02-27 09:25:13 +08:00
LLVM GN Syncbot
b1916599be [gn build] Port 6de5fcc74637 2024-02-26 22:17:16 +00:00
LLVM GN Syncbot
f887fad547 [gn build] Port 8c5e9cf73713 2024-02-26 14:10:26 +00:00
LLVM GN Syncbot
62e88bc89a [gn build] Port 440b1743ee0c 2024-02-26 14:10:25 +00:00
LLVM GN Syncbot
ce78dfa4f0 [gn build] Port 28233408a2c8 2024-02-26 14:10:24 +00:00
Jack Styles
28233408a2
[CodeGen] [ARM] Make RISC-V Init Undef Pass Target Independent and add support for the ARM Architecture. (#77770)
When using Greedy Register Allocation, there are times where
early-clobber values are ignored, and assigned the same register. This
is illeagal behaviour for these intructions. To get around this, using
Pseudo instructions for early-clobber registers gives them a definition
and allows Greedy to assign them to a different register. This then
meets the ARM Architecture Reference Manual and matches the defined
behaviour.

This patch takes the existing RISC-V patch and makes it target
independent, then adds support for the ARM Architecture. Doing this will
ensure early-clobber restraints are followed when using the ARM
Architecture. Making the pass target independent will also open up
possibility that support other architectures can be added in the future.
2024-02-26 12:12:31 +00:00
Jason Eckhardt
f75c6ed93e
[TableGen] Efficiency improvements for encoding HwMode collection. (#82902)
Currently the DecoderEmitter spends a fair amount of cycles performing
repeated linear walks over the entire instruction list. This patch
eliminates one such walk during HwMode collection for EncodingInfos.

The eliminated traversal visits every instruction and then every
EncodingInfos entry for that instruction merely to collect all
referenced HwModes. That information already happens to be present in
the HwModeSelects created during the one-time construction of
CodeGenHwModes. We instead traverse the HwModeSelects, collecting each
one referenced as an encoding select. This set is a small constant in
size and does not generally grow with the size of the instruction set.
2024-02-26 12:58:17 +08:00
FruitClover
d99b148177
[TableGen] Fix __CLAUSE_NO_CLASS macro leak in directive emitter (#82912)
`__CLAUSE_NO_CLASS` was not undefined inside the
`GEN_CLANG_CLAUSE_CLASS` block, resulting in macro redifinition warnings
when several generated directives are used simultaneously.
2024-02-25 20:34:38 +03:00
LLVM GN Syncbot
07fd5ca3a8 [gn build] Port 5874874c2472 2024-02-23 19:03:52 +00:00
Benoît Amiaux
52ada07ef5
build_llvm_release.bat: add tarball export to x64 release (#79840)
Like linux releases, export a tar.xz files containing most llvm tools,
including non toolchain utilities, llvm-config, llvm-link and others.

We do this by reconfiguring cmake one last time at the last step,
running the install target so we do not need to recompile anything.

Fix #51192
Fix #53052
2024-02-23 14:49:57 +01:00
Dani
6fae3e7844
[llvm][AArch64] Do not inline a function with different signing scheme. (#80642)
If the signing scheme is different that maybe the functions assumes
different behaviours and dangerous to inline them without analysing
them. This should be a rare case.
2024-02-23 09:30:36 +01:00
LLVM GN Syncbot
2b0f5667e2 [gn build] Port aaf2d078b622 2024-02-22 23:37:49 +00:00
LLVM GN Syncbot
0eb64eebde [gn build] Port df6f756a1927 2024-02-22 21:12:51 +00:00
S. Bharadwaj Yadavalli
54a6cf1506
[DirectX][NFC] Use LLVM Types in DXIL Operation specifications in DXIL.td (#81692)
This change uniformly uses LLVM Types in the specification of parameter
types and overload types of DXIL operation.

Updated (a) parameter types accordingly in the specification of existing
DXILOperations and (b) DXILEmitter.
2024-02-22 13:10:58 -05:00
Jason Eckhardt
05af9c83f3
[TableGen] Suppress per-HwMode duplicate instructions/tables. (#82567)
Currently, for per-HwMode encoding/decoding, those instructions that do
not have a HwMode override are duplicated into the decoder tables for
all HwModes. This includes inducing multiple tables for instructions
that are otherwise unrelated (e.g., different namespace with no
overrides at all).

This patch adds support to suppress instruction and table duplicates.
TableGen option "-gen-disassembler --suppress-per-hwmode-duplicates"
enables the suppression (off by default).

For one downstream backend with a complicated ISA and major
cross-generation encoding differences, this eliminates ~32000 duplicate
table entries at the time of this patch.

There are legitimate reasons to suppress or not suppress duplicates. If
there are relatively few non-overridden related instructions, it can be
convenient to pull them into the per-mode tables (only need to decode
the per-mode tables, slightly simpler decode function in disassembler).
On the other hand, in some backends, the opposite is true or the size is
too large to tolerate any duplication in the first place. We let the
user decide which makes sense.

This is currently off by default, though there is no reason it couldn't
be enabled by default. Any existing backends downstream using the
per-HwMode feature will function as before. Turning on the feature
requires minor modifications to their disassembler due to more/less
tables and naming.
2024-02-22 11:36:10 +08:00
LLVM GN Syncbot
dd6d059da5 [gn build] Port d62ca8def395 2024-02-22 01:57:57 +00:00
LLVM GN Syncbot
ba31a195f5 [gn build] Port 4c0fdcdb3307 2024-02-22 01:57:57 +00:00
Alexander Richardson
db9811cd13
Make lldbDataFormatters.py compatible with Python 3.8 (#82518)
I just tried to load this into LLDB built against Python 3.8.5 and got
the following error: `TypeError: 'type' object is not subscriptable`. I
could fix this by wrapping the annotations in quotes but since Python
3.7 this syntax can be enabled with `from __future__ import
annotations`.
2024-02-21 11:53:01 -08:00
Nico Weber
1c81b4a8f2 [gn] port 0a518db99e0c (clang-installapi) 2024-02-21 14:20:26 -05:00
LLVM GN Syncbot
f8c1af1d09 [gn build] Port 8b84de26dfc1 2024-02-21 09:00:43 +00:00
LLVM GN Syncbot
ab7dcb0ef6 [gn build] Port a2afcd572186 2024-02-21 05:57:16 +00:00
LLVM GN Syncbot
823102ab1e [gn build] Port 79889734b940 2024-02-21 04:36:57 +00:00
Tom Stellard
2836d8edbf
[workflows] Fix permissions check for creating new releases (#81163)
The default GitHub token does not have read permissions on the org, so
we need to use a custom token in order to read the members of the
llvm-release-managers team.
2024-02-20 17:52:38 -08:00
Nico Weber
7c071c23ff [gn] port ff4d6c64ee42 2024-02-20 20:09:21 -05:00
LLVM GN Syncbot
7542f60b72 [gn build] Port c625b9965273 2024-02-20 21:08:05 +00:00
Nico Weber
bb029a5c03 [gn] port 4c6043de0b83 (InstallAPITests) 2024-02-20 15:57:38 -05:00
LLVM GN Syncbot
8bc0cbd6c7 [gn build] Port 49a8fc0da4d0 2024-02-20 12:18:40 +00:00
Luke Lau
283a6b9936
[UTC] Fix SyntaxWarning on Python 3.12 (#82327)
On Python 3.12 we now get a warning in common.py:

llvm/utils/UpdateTestChecks/common.py:488: SyntaxWarning: invalid escape
sequence '\s'

This fixes it by using a raw string literal, see
https://github.com/llvm/llvm-project/pull/78036 and
https://docs.python.org/3/library/re.html
2024-02-20 17:36:01 +08:00
Rainer Orth
f6ac598c10
[Release] Don't build during test-release.sh Phase 3 install (#82001)
As described in [test-release.sh ninja install does builds in Phase
3](https://github.com/llvm/llvm-project/issues/80999), considerable
parts of Phase 3 of a `test-release.sh` build are run by `ninja
install`, ignoring both `$Verbose` and the parallelism set via `-j NUM`.

This patches fixes this by not specifying any explicit build target for
Phase 3, thus running the full build as usual.

Tested on `sparc64-unknown-linux-gnu`.
2024-02-20 07:26:48 +01:00
LLVM GN Syncbot
f02f169cec [gn build] Port 49775b1dc0cd 2024-02-20 05:31:35 +00:00
Aiden Grossman
9c6df7d90a
[Github] Add ability to record jobs over time to job counting script (#82137)
This patch adds new flags to the count_running_jobs.py script to enable
the collection of data over a period of time. Specifically, the
--output_file flag is added to enable writing output data to a file, and
the --data-collection-interval flag is added to configure the frequency
that the script checks the job count.
2024-02-19 17:00:21 -08:00
Aiden Grossman
66d8377dbd
[Github] Add ability to filter jobs in job counting script (#82136)
This patch adds a new flag pair, --filter-gha-runners, and
--no-filter-gha-runners, that filters out all non-Github hosted runners
so that we can actual counts of the Github runners, where we are
actually limited.
2024-02-19 16:28:47 -08:00
LLVM GN Syncbot
bb049094d5 [gn build] Port 2ea5d167ae43 2024-02-19 07:56:38 +00:00
Jason Eckhardt
2ed0aacf97
[TableGen] Fixes for per-HwMode decoding problem (#82201)
Today, if any instruction uses EncodingInfos/EncodingByHwMode to
override the default encoding, the opcode field of the decoder table is
generated incorrectly. This causes failed disassemblies and other
problems.

Specifically, the main correctness issue is that the EncodingID is
inadvertently stored in the table rather than the actual opcode. This is
caused by having set up the IndexOfInstruction map incorrectly during
the loop to populate NumberedEncodings-- which is then propagated around
when OpcMap is set up with a bad EncodingIDAndOpcode.

Instead, do away with IndexOfInstruction altogether and use opcode value
queried from CodeGenTarget::getInstrIntValue to set up OpcMap. This
itself exposed another problem where emitTable was using the decoded
opcode to index into NumberedEncodings. Instead pass in the
EncodingIDAndOpcode vector, and create the reverse mapping from Opcode
to EncodingID, which is then used to index NumberedEncodings.

This problem is not currently exposed upstream since no in-tree targets
yet use the per-HwMode feature. It does show up in at least two
downstream targets.
2024-02-19 13:14:22 +08:00
Sergei Barannikov
1e4c76cdc9
[MC][AsmParser] Make MatchRegisterName return MCRegister (NFC) (#81408)
`MCRegister` is preferred over `unsigned` nowadays.
2024-02-18 13:59:49 +03:00
Nico Weber
4206d06130 [gn] port d332d88b919f (tzdb.cpp) 2024-02-17 21:24:58 -05:00
LLVM GN Syncbot
9c4e2fe589 [gn build] Port 0e6a48c3e8cc 2024-02-17 00:01:26 +00:00
azhan92
3af5c98200
[Release] Install compiler-rt builtins during Phase 1 on AIX (#81485)
The current test-release.sh script does not install the necessary
compiler-rt builtin's during Phase 1 on AIX, resulting on a
non-functional Phase 1 clang. Futhermore, the installation is also
necessary for Phase 2 on AIX.

Co-authored-by: Alison Zhang <alisonzhang@ibm.com>
2024-02-15 22:27:45 -04:00
LLVM GN Syncbot
9150858b82 [gn build] Port e606dc1dafea 2024-02-16 01:23:52 +00:00
LLVM GN Syncbot
2f516d4b31 [gn build] Port 24144d726fef 2024-02-16 01:23:51 +00:00
Jay Foad
594d57e07a [TableGen] New RegUnitSet(Name) constructor. NFC. 2024-02-15 11:35:52 +00:00
Prabhuk
6c74a6f6f4
Revert "[lldb-dap] Add support for data breakpoint. (#81541)" (#81812)
This reverts commit 8c56e78ec531f0e2460213c20fff869b6b7add99.

Reverting to address the LLDB test failure in ARM64.
2024-02-14 22:07:26 -08:00
Jessica Clarke
de6fad5146
[TableGen][NFCI] Simplify TypeSetByHwMode::intersect and make extensible (#81688)
The current implementation considers both iPTR+iN and everything else
all in one go, which leads to more special casing when iPTR is present
in only one set than is described in the comment block. Moreover this
makes it very difficult to add any new iPTR-like wildcards due to the
exponential combinatorial explosion that occurs.

Logically, iPTR+iN handling is entirely independent from everything
else, so rewrite the code to do them separately. This removes special
cases, making the core of the implementation more succinct, whilst more
clearly implementing exactly what is described in the comment block, and
allows for any number of (non-overlapping) wildcards to be added to the
list, as needed by CHERI LLVM downstream (due to having a new capability
type which, much like a normal integer pointer in LLVM, varies in size
between targets and modes).

In testing, this change results in identical TableGen output for all
in-tree backends (including those in LLVM_ALL_EXPERIMENTAL_TARGETS), and
it is intended that this implementation is entirely equivalent to the
old one.
2024-02-15 04:02:30 +00:00