13737 Commits

Author SHA1 Message Date
Nico Weber
2d7fdfa61f [gn] port 09e98950bfcf (InstallAPI) 2024-02-14 09:39:00 -05:00
Jay Foad
f723260a80
[TableGen] Stop using make_pair and make_tuple. NFC. (#81730)
These are unnecessary since C++17.
2024-02-14 13:16:20 +00:00
Nikita Popov
124cd11d7f Revert "[GitHub][workflows] Ask reviewers to merge PRs when author cannot (#81142)"
This reverts commit 38c706e30f5f339bfb0bfb26fd7b5c2d5086064a.

This workflow always fails in cases where it needs to create a
comment, due to a permissions issue, see the discussion at:
https://discourse.llvm.org/t/rfc-fyi-pull-request-greetings-for-new-contributors/75458/20
2024-02-14 11:33:36 +01:00
LLVM GN Syncbot
14b0d0de1f [gn build] Port edff3ff4d37a 2024-02-14 02:35:48 +00:00
LLVM GN Syncbot
9168a2119c [gn build] Port a6b846ae1e58 2024-02-13 23:42:41 +00:00
Nico Weber
4bc2a4f64f [gn] fix typo in 8c56e78ec531
The missing trailing comma confuses the sync script.
2024-02-13 18:21:29 -05:00
Zequan Wu
8c56e78ec5
[lldb-dap] Add support for data breakpoint. (#81541)
This implements functionality to handle `DataBreakpointInfo` request and
`SetDataBreakpoints` request.

If variablesReference is 0 or not provided, interpret name as ${number
of bytes}@${expression} to set data breakpoint at the given expression
because the spec
https://microsoft.github.io/debug-adapter-protocol/specification#Requests_DataBreakpointInfo
doesn't say how the client could specify the number of bytes to watch.

This is based on top of https://github.com/llvm/llvm-project/pull/80753.
2024-02-13 16:38:56 -05:00
Jay Foad
a7cebadc10 [TableGen] Trivial simplification in computeRegUnitSets. NFC. 2024-02-13 17:16:25 +00:00
Jay Foad
e847abc5b4 [TableGen] Remove trivial helper function hasRegUnit. NFC. 2024-02-13 16:59:17 +00:00
Zequan Wu
d58c128bc4
[lldb-dap][NFC] Add Breakpoint struct to share common logic. (#80753)
This adds a layer between `SounceBreakpoint`/`FunctionBreakpoint` and
`BreakpointBase` to have better separation and encapsulation so we are
not directly operating on `SBBreakpoint`.

I basically moved the `SBBreakpoint` and the methods that requires it
from `BreakpointBase` to `Breakpoint`. This allows adding support for
data watchpoint easier by sharing the logic inside `BreakpointBase`.
2024-02-13 11:38:02 -05:00
S. Bharadwaj Yadavalli
8ba4ff3925
[DirectX][NFC] Change specification of overload types and attribute in DXIL.td (#81184)
- Specify overload types of DXIL Operation as list of types instead of a
string.
- Add supported DXIL type record definitions to `DXIL.td` leveraging
`LLVMType` to avoid duplicate definitions.
 - Spell out DXIL Operation Attribute specification string.
 - Make corresponding changes to process the records in DXILEmitter.cpp
2024-02-13 08:12:03 -08:00
Jay Foad
1f90af183d [TableGen] Do not speculatively grow RegUnitSets. NFC.
This seems to be a trick to avoid copying a RegUnitSet, but it can be
done more simply using std::move.
2024-02-13 16:08:56 +00:00
Jay Foad
485ebbff55 [TableGen] Use emplace_back instead of resize to size() + 1. NFC. 2024-02-13 15:59:40 +00:00
David Spickett
38c706e30f
[GitHub][workflows] Ask reviewers to merge PRs when author cannot (#81142)
This uses
https://pygithub.readthedocs.io/en/stable/github_objects/Repository.html?highlight=get_collaborator_permission#github.Repository.Repository.get_collaborator_permission.

Which does
https://docs.github.com/en/rest/collaborators/collaborators?apiVersion=2022-11-28#get-repository-permissions-for-a-user
and returns the top level "permission" key.

This is less detailed than the user/permissions key but should be fine
for this
use case.

When a review is submitted we check:
* If it's an approval.
* Whether we have already left a merge on behalf comment (by looking for
a hidden HTML comment).
* Whether the author has permissions to merge their own PR. 
* Whether the reviewer has permissions to merge.

If needed we leave a comment tagging the reviewer. If the reviewer also
doesn't have merge permission, then it asks them to find someone else
who does.
2024-02-13 14:52:02 +00:00
Jay Foad
5e5e51e906 Make use of std::inserter. NFC. 2024-02-13 14:34:58 +00:00
Jay Foad
f7cddf8006
[TableGen] Use std::move instead of swap. NFC. (#81606)
Historically TableGen has used `A.swap(B)` to move containers without
the expense of copying them. Perhaps this predated rvalue references. In
any case `A = std::move(B)` seems like a more direct way to implement
this when only A is required after the operation.
2024-02-13 14:31:54 +00:00
LLVM GN Syncbot
af56beac45 [gn build] Port f65577830073 2024-02-13 14:03:07 +00:00
Jay Foad
880afa1c5d
[TableGen] Use vectors instead of sets for testing intersection. NFC. (#81602)
In a few places we test whether sets (i.e. sorted ranges) intersect by
computing the set_intersection and then testing whether it is empty. For
this purpose it should be more efficient to use a std:vector instead of
a std::set to hold the result of the set_intersection, since insertion
is simpler.
2024-02-13 13:44:31 +00:00
LLVM GN Syncbot
e678e6edec [gn build] Port fe3406e34988 2024-02-13 10:49:19 +00:00
Arthur Eubanks
93cdd1b5cf
[PGO] Add ability to mark cold functions as optsize/minsize/optnone (#69030)
The performance of cold functions shouldn't matter too much, so if we
care about binary sizes, add an option to mark cold functions as
optsize/minsize for binary size, or optnone for compile times [1]. Clang
patch will be in a future patch.

This is intended to replace `shouldOptimizeForSize(Function&, ...)`.
We've seen multiple cases where calls to this expensive function, if not
careful, can blow up compile times. I will clean up users of that
function in a followup patch.

Initial version: https://reviews.llvm.org/D149800

[1]
https://discourse.llvm.org/t/rfc-new-feature-proposal-de-optimizing-cold-functions-using-pgo-info/56388
2024-02-12 14:52:08 -08:00
Jay Foad
595d8d4e85 [TableGen] Make use of find_if. NFC. 2024-02-12 16:46:07 +00:00
LLVM GN Syncbot
1c48c9234b [gn build] Port f9d6d6fbcc23 2024-02-12 07:32:50 +00:00
LLVM GN Syncbot
2a51c56d8e [gn build] Port 5e9eaf87b374 2024-02-10 19:44:41 +00:00
LLVM GN Syncbot
fd140d4283 [gn build] Port d26b43ff4f73 2024-02-10 09:13:09 +00:00
Tom Stellard
bd65547805
[workflows] Create a more descriptive title and body when creating a PR for backports (#80396)
When a backport request is made, the resulting pull request will have a
title like this:

<release branch>: <First line of HEAD commit for the branch>

And a body that says:

Backport <commit0> <commit1> ..

Requested By: <user>
2024-02-09 13:04:49 -08:00
Tomas Matheson
a9e546cc71
[TableGen][NFC] convert TreePatternNode pointers to references (#81134)
Almost all uses of `*TreePatternNode` expect it to be non-null. There
was the occasional check that it wasn't, which I have removed. Making
them references makes it clear that they exist.

This was attempted in 2018 (1b465767d6ca69f4b7201503f5f21e6125fe049a)
for `TreePatternNode::getChild()` but that was reverted.
2024-02-09 13:35:42 +00:00
Nico Weber
1f780bfac9 [gn] port a8d4a024e6bea3a (BuiltinsRISCV.td) 2024-02-09 08:19:31 -05:00
LLVM GN Syncbot
75798f21ca [gn build] Port ac3bd2bd5301 2024-02-09 10:20:23 +00:00
Pierre van Houtryve
b9079baadd
[NFC] clang-format utils/TableGen (#80973)
```
find llvm/utils/TableGen -iname "*.h" -o -iname "*.cpp" | xargs clang-format-16 -i
```

Split from #80847
2024-02-09 09:27:04 +01:00
Arthur Eubanks
0572dabb71 [gn build] Add IntrinsicsSPIRV.h generator
This was missing in the gn build for some reason, causing build errors like http://45.33.8.238/linux/130337/step_4.txt after 3b57b647.
2024-02-08 21:57:30 +00:00
S. Bharadwaj Yadavalli
758fd59d01
[DirectX][NFC] Change usage pattern *Dxil* to *DXIL* for uniformity (#80778)
Match DXIL TableGen class names with structure names in DXIL Emitter. 
Delete unnecessary Name field.
2024-02-08 10:02:32 -08:00
Jason Eckhardt
d01864eb2f
[TableGen] Remove map CodeGenTarget::InstrToIntMap. (#81079)
This patch removes CodeGenTarget::InstrToIntMap, using instead a new
member CodeGenInstruction::EnumVal to store each enum value. This value
is computed and set by CodeGenTarget::computeInstrsByEnum and queried by
CodeGenTarget::getInstrIntValue.
2024-02-07 19:33:16 -08:00
Jason Eckhardt
567d304e53
[TableGen][NFC] Replace hardcoded opcode numbering. (#81065)
This patch uses the recently introduced CodeGenTarget::getInstrIntValue
to replace hardcoded opcode enum value numbering in a few places.
2024-02-07 19:04:14 -08:00
Yi Kong
d6c2cbbc65
Fix test failure if CLANG_VENDOR contains spaces (#81017) 2024-02-08 07:31:34 +09:00
Jason Eckhardt
8ae0485070
[TableGen] Extend direct lookup to instruction values in generic tables. (#80486)
Currently, for some tables involving a single primary key field which is
integral and densely numbered, a direct lookup is generated rather than
a binary search. This patch extends the direct lookup function
generation to instructions, where the integral value corresponds to the
instruction's enum value.

While this isn't as common as for other tables, it does occur in at
least one downstream backend and one in-tree backend.

Added a unit test and minimally updated the documentation.
2024-02-07 12:49:39 +08:00
LLVM GN Syncbot
bcd1490496 [gn build] Port 2217837c3377 2024-02-07 00:47:43 +00:00
LLVM GN Syncbot
e96ba2509d [gn build] Port c13e271a3836 2024-02-06 21:27:06 +00:00
Aiden Grossman
38476b063f
[Github] Add script to count running jobs (#80250)
This patch adds a script to automatically query the number of running
jobs and print them to the terminal as this functionality isn't
available through the Github UI (unless you are a Github administrator).
2024-02-05 23:49:34 -08:00
Jason Eckhardt
1442b0e653
[TableGen] Remove redundant buffer copies for ULEB128 decode calls. (#80199)
This patch removes a couple of redundant buffer copies in emitTable for
setting up calls to decodeULEB128. Instead, provide the Table.data
buffer directly to the calls-- where decodeULEB128 does its own buffer
overflow checking.

Factor out 7 explicit loops to emit ULEB128 bytes into emitULEB128. Also
factor out 4 copies of 24-bit numtoskip emission into emitNumToSkip.

The functionality is already covered by existing unit tests and by
virtue of most of the in-tree back-ends exercising the decoder emitter.
2024-02-06 13:23:13 +08:00
S. Bharadwaj Yadavalli
152325d342
[DirectX][NFC] Change all DXIL TableGen tokens to CamelCase (#80714)
These changes are in preparation for potential improvement of DXIL
operation description and addition of more DXIL operations to `DXIL.td`.
2024-02-05 14:52:15 -06:00
Tom Stellard
9805c051f7
[workflows] Close issues used for backports once the PR has been created (#80394)
This will allow us to track the state of the backport request in the PR,
rather than in the issue. The state updates for PRs can be automated, so
this will save us some triage work.
2024-02-05 10:59:14 -08:00
pvanhout
6deb7cfd74 Revert "[TableGen] Exclude LLVMTableGenGlobalISel from "all""
This reverts commit 722db781d090fc2fd636c299e5f75a0b72c22372.
2024-02-05 10:00:22 +01:00
pvanhout
d2b0e23247 Revert "[TableGen] Trying fix for PatternParser linker error"
This reverts commit ab460797f3af80bd262648d4dd306ef751d4e0f6.
2024-02-05 10:00:16 +01:00
pvanhout
991d04d721 Revert "[NFC][TableGen][GlobalISel] Move MIR Pattern Parsing out of Combiner Impl (#80257)"
This reverts commit cfa0833ccc7450a322e709583e894e4c96ce682e.
2024-02-05 10:00:08 +01:00
pvanhout
722db781d0 [TableGen] Exclude LLVMTableGenGlobalISel from "all" 2024-02-05 09:52:31 +01:00
pvanhout
ab460797f3 [TableGen] Trying fix for PatternParser linker error
There is an implicit dependency here and we can't call CodeGenIntrinsics.cpp functions from PatternParser.cpp reliably, so some build bots were failing.

Try to add LLVMTableGenCommon to the list of source files to see if it fixes it, if it doesn't , I'll revert.
2024-02-05 09:04:20 +01:00
Pierre van Houtryve
cfa0833ccc
[NFC][TableGen][GlobalISel] Move MIR Pattern Parsing out of Combiner Impl (#80257)
This just moves code around so the MIR pattern parsing logic is
separated and reusable.
2024-02-05 08:42:31 +01:00
LLVM GN Syncbot
6ad692b7b3 [gn build] Port 4e112e5c1c85 2024-02-03 23:28:57 +00:00
LLVM GN Syncbot
b205ea15c1 [gn build] Port f87e3b61c8b6 2024-02-03 19:50:28 +00:00
LLVM GN Syncbot
9c2446ea7c [gn build] Port 2352fdd2026e 2024-02-02 21:09:13 +00:00