13028 Commits

Author SHA1 Message Date
Joel E. Denny
9e739fdb85
[lit] Fix some issues from --per-test-coverage (#65242)
D154280 (landed in 64d19542e78a in July, 2023) implements
`--per-test-coverage` (which can also be specified via 
`lit_config.per_test_coverage`).  However, it has a few issues, which
the current patch addresses:

1. D154280 implements `--per-test-coverage` only for the case that lit 
   is configured to use an external shell.  The current patch extends
   the implementation to lit's internal shell.

2. In the case that lit is configured to use an external shell,
   regardless of whether `--per-test-coverage` is actually specified,
   D154280 causes `%dbg(RUN: at line N)` to be expanded in RUN lines
   early and in a manner that is specific to sh-like shells.  As a
   result, later code in lit that expands it in a shell-specific
   manner is useless as there's nothing left to expand.  The current
   patch cleans up the implementation to avoid useless code.

3. Because of issue 2, D154280 corrupts support for windows `cmd` as
   an external shell (effectively comments out all RUN lines with
   `:`).  The current patch happens to fix that particular corruption
   by addressing issue 2.  However, D122569 (landed in 1041a9642ba0 in
   April, 2022) had already broken support for windows `cmd` as an
   external shell (discards RUN lines when expanding `%dbg(RUN: at
   line N)`).  The current patch does not attempt to fix that bug.
   For further details, see the PR discussion of the current patch.

The current patch addresses the above issues by implementing
`--per-test-coverage` before selecting the shell (internal or
external) and by leaving `%dbg(RUN: at line N)` unexpanded there.
Thus, it is expanded later in a shell-specific manner, as before
D154280.

This patch introduces `buildPdbgCommand` into lit's implementation to
encapsulate the process of building (or rebuilding in the case of the 
`--per-test-coverage` implementation) a full `%dbg(RUN: at line N)
cmd` line and asserting that the result matches `kPdbgRegex`.  It also
cleans up that and all other uses of `kPdbgRegex` to operate on the 
full line with `re.fullmatch` not `re.match`.  This change better
reflects the intention in every case, but it is expected to be NFC 
because `kPdbgRegex` ends in `.*` and thus avoids the difference
between `re.fullmatch` and `re.match`.  The only caveat is that `.*`
does not match newlines, but RUN lines cannot contain newlines
currently, so this caveat currently shouldn't matter in practice.

The original `--per-test-coverage` implementation avoided accumulating
`export LLVM_PROFILE_FILE={profile}` insertions across retries (due to
`ALLOW_RETRIES`) by skipping the insertion if `%dbg(RUN: at line N)` 
was not present and thus had already been expanded.  However, the 
current patch makes sure the insertions also happen for commands
without `%dbg(RUN: at line N)`, such as preamble commands or some
commands from other lit test formats.  Thus, the current patch
implements a different mechanism to avoid accumulating those
insertions (see code comments).
2023-09-14 10:08:20 -04:00
Louis Dionne
b57df9fe9a [lit][NFC] Remove stray character in docstring 2023-09-14 09:03:00 -04:00
Tom Stellard
c532db0133
workflows/pr-subscriber: Use our own custom concurrency implementation (#66263)
The builtin concurrency functionality for the workflows will cancel a
pending job if there is another job from the same workflow running. For
the pr-subscriber job, this means that if multiple labels are added at
the same time, then some of the pr-subscriber jobs will be cancelled and
the PR will not have all the necessary mentions.
2023-09-13 23:46:23 -07:00
Mehdi Amini
d2cd5a4595
Fix PR description HTML escaping, the surrounding <pre> tag shouldn't be escaped (#66322) 2023-09-13 21:40:57 -07:00
LLVM GN Syncbot
97edcdeeef [gn build] Port 45c160510f6c 2023-09-14 03:34:54 +00:00
LLVM GN Syncbot
c730e3c2a5 [gn build] Port 588023ddafb4 2023-09-13 00:31:07 +00:00
Nico Weber
749ec26d83 [gn] port b85e1862c119 2023-09-12 17:19:24 -07:00
Tom Stellard
64751ea2c5
github-automation: Use a single comment for team mentions on pull requests (#66037)
This will reduce the number of notifications created when a pull request
label is added. Each team will only get a notification when their team's
label is added and not when other teams' labels are added.
2023-09-12 13:21:29 -07:00
Tom Stellard
cff72d7022
workflows/pr-subscriber: Handle libc++ and libc++abi labels (#66029) 2023-09-12 13:06:57 -07:00
Mehdi Amini
38e9006896
Include the issue description in the subscription comment so that email notification is self-contained (#65839)
This makes it so that we don't need to open the issue to have the
description in our inbox on subscription.
2023-09-11 22:39:01 -07:00
LLVM GN Syncbot
0994463271 [gn build] Port e7a45c6d768b 2023-09-12 03:47:48 +00:00
LLVM GN Syncbot
e13bbb9b3b [gn build] Port ce5652c78ac0 2023-09-12 03:47:47 +00:00
LLVM GN Syncbot
d0ebca9e77 [gn build] Port a284d0cc9c69 2023-09-12 03:47:47 +00:00
LLVM GN Syncbot
7fdabfd69c [gn build] Port 0e30dd44adc9 2023-09-12 03:47:46 +00:00
Shengchen Kan
503e3a4130
[X86] Remove _REV instructions from the EVEX2VEX tables (#65752)
_REV instruction should not appear before encoding optimization, so
there is no chance to compress it during MIR optimizations.
2023-09-11 09:54:05 +08:00
Mehdi Amini
4085cb380d
Improve the pull-request subcription notification format by adding the description and files statistics (#65828) 2023-09-08 22:54:53 -07:00
Tom Stellard
5f16a3a489
workflows: Add a simple pull request subscription workflow (#64913)
This new workflow will make it possible for people to subscribe to pull
requests based on the labels that are added. Labels will be added
automatically to the pull requests based on the modified files and each
label will be associated with a GitHub team that will be notified when
the label is added.

See
https://discourse.llvm.org/t/changes-to-pull-request-subscription-system/73296
2023-09-08 09:40:37 -07:00
Wang Pengcheng
2f780812ed
[TableGen] Add a field to filter out GenericTable entries (#65458)
A field `FilterClassField` is added to `GenericTable` class, which
is an optional bit field of `FilterClass`. If specified, only those
records with this field being true will have corresponding entries
in the table.
2023-09-08 16:27:11 +08:00
Phoebe Wang
2e44b07e24
[X86] Do not directly fold for VINSERTPS (#65718)
We have already customized folding for VINSERTPS by 7e6606f4f1, which do
the folding when alignment >= 4 bytes.

We cannot arbitrarily fold it like others because we need to calculate
the source offset.
2023-09-08 15:35:44 +08:00
Arthur Eubanks
d5c6bd1ce9 [gn build] Manually port 46f3ade 2023-09-07 14:41:16 -07:00
Joel E. Denny
9f111d990b Revert "[lit] Drop "Script:", make -v and -a imply -vv"
This reverts commit 09b6e457d91ce84088e6e21783913e5f1e5bd227.

The reason for the revert is discussed at:
https://discourse.llvm.org/t/rfc-improving-lits-debug-output/72839/52
2023-09-07 12:35:56 -04:00
Joel E. Denny
bb6d5fc205 Revert "[lit] Improve test output from lit's internal shell"
This reverts commit c981c533055e14302e7bff5d6898c9308065f665.

The reason for the revert is discussed at:
https://discourse.llvm.org/t/rfc-improving-lits-debug-output/72839/52
2023-09-07 12:35:55 -04:00
Joel E. Denny
bbd0564c8c Revert "[lit] Try to fix c981c533055e test fails under windows"
This reverts commit f254bbf23374190c88a2b1a5f163622fbec9a936.

The reason for the revert is discussed at:
https://discourse.llvm.org/t/rfc-improving-lits-debug-output/72839/52
2023-09-07 12:35:55 -04:00
Joel E. Denny
2b964c84db Revert "[lit] Fix f254bbf23374 FileCheck patterns"
This reverts commit 3db5db92d746bad8ba1762ca290a176e25d48565.

The reason for the revert is discussed at:
https://discourse.llvm.org/t/rfc-improving-lits-debug-output/72839/52
2023-09-07 12:35:55 -04:00
Joel E. Denny
dc7aa0a143 Revert "[lit] Fix c981c533055e's remaining test fails under windows"
This reverts commit 012d844fb856a89368aca95ca994726554b90f22.

The reason for the revert is discussed at:
https://discourse.llvm.org/t/rfc-improving-lits-debug-output/72839/52
2023-09-07 12:35:55 -04:00
Joel E. Denny
80786af06d Revert "[lit] Fix yet another test fail under windows"
This reverts commit b6bd9d275f783f8150c8a04145ef2a31edb4fddf.

The reason for the revert is discussed at:
https://discourse.llvm.org/t/rfc-improving-lits-debug-output/72839/52
2023-09-07 12:35:55 -04:00
Joel E. Denny
b5c5ae7ddb Revert "[lit] Echo full RUN lines in case of external shells (#65267)"
This reverts commit 19b44c2bdf1726acd380f76d26673a27ecf826ba.

The reason for the revert is discussed at:
https://discourse.llvm.org/t/rfc-improving-lits-debug-output/72839/52
2023-09-07 12:35:54 -04:00
Joel E. Denny
7f9ceabf1c Revert "Revert "[lit] Echo full RUN lines in case of external shells""
This reverts commit efec733bf5bb97b34361c4ce49346edc6afa3866.

The reason for the revert is discussed at:
https://discourse.llvm.org/t/rfc-improving-lits-debug-output/72839/52
2023-09-07 12:35:54 -04:00
LLVM GN Syncbot
211da3f3d2 [gn build] Port 84e2fd7ee4a9 2023-09-07 15:26:29 +00:00
Nico Weber
8f675d1a26 [gn] port f78f93bc9fd4 (libc++ tzdb) 2023-09-06 20:02:48 -04:00
Dave Lee
a4b82f7f9b
[lldb] Allow lldbDataFormatters.py to be used by other names (NFC) (#65528)
Instead of hard-coding the name `lldbDataFormatters`, use `__name__` to
get the module's name.

This allows the formatters to be loaded from any path, with any
filename.
2023-09-06 13:39:45 -07:00
LLVM GN Syncbot
68e94f1f27 [gn build] Port 065dc485bd4b 2023-09-06 00:01:57 +00:00
Nico Weber
d50b56d18c [gn] port fbdf684fae52 2023-09-05 20:01:17 -04:00
Joel E. Denny
efec733bf5 Revert "[lit] Echo full RUN lines in case of external shells"
Buildbots failed after this landed, as reported at:

<https://github.com/llvm/llvm-project/pull/65267#issuecomment-1707318337>

This reverts commit 9191ba7144b39f5af699993d66f3587d5da49759.
2023-09-05 17:20:21 -04:00
Joel E. Denny
19b44c2bdf
[lit] Echo full RUN lines in case of external shells (#65267)
Before <https://reviews.llvm.org/D154984> and
<https://reviews.llvm.org/D156954>, lit reported full RUN lines in a
`Script:` section. Now, in the case of lit's internal shell, it's the
execution trace that includes them. However, if lit is configured to use
an external shell (e.g., bash, windows `cmd`), they aren't reported at
all.

A fix was requested at the following:

* <https://reviews.llvm.org/D154984#4627605>
*
<https://discourse.llvm.org/t/rfc-improving-lits-debug-output/72839/35?u=jdenny-ornl>

This patch does not correctly address the case when the external shell
is windows `cmd`. As discussed at
<https://github.com/llvm/llvm-project/pull/65242>, it's not clear
whether that's a use case that people still care about, and it seems to
be generally broken anyway.
2023-09-05 10:48:18 -04:00
Nico Weber
5857fe0647 [gn] port bc45acbddceea58cdd1 2023-09-05 09:49:21 -04:00
pvanhout
844c0da777 [TableGen][GlobalISel] Add MIR Pattern Builtins
Adds a new feature to MIR patterns: builtin instructions.
They offer some additional capabilities that currently cannot be expressed without falling back to C++ code.
There are two builtins added with this patch, but more can be added later as new needs arise:
 - GIReplaceReg
 - GIEraseRoot

Depends on D158714, D158713

Reviewed By: arsenm, aemerson

Differential Revision: https://reviews.llvm.org/D158975
2023-09-05 08:19:07 +02:00
pvanhout
4e513f69a1 [GlobalISel] Cleanup Combine.td
Now that the old backend is gone, clean-up a few things that no longer make sense and tidy up the file a bit.

Depends on D158710

Reviewed By: arsenm

Differential Revision: https://reviews.llvm.org/D158714
2023-09-05 08:19:06 +02:00
pvanhout
aaf6755631 [GlobalISel] Refactor Combiner API
Remove CodeGen leftovers from the old combiner backend and adapt the API to fit the new backend better.
It's now quite a bit closer to how InstructionSelector works.

- `CombinerInfo` is now a simple "options" struct.
- `Combiner` is now the base class of all TableGen'd combiner implementation.
    - Many fields have been moved from derived classes into that class.
    - It has been refactored to create & own the Observer and Builder.
- `tryCombineAll` TableGen'd method can now be renamed, which allows targets to implement the actual `tryCombineAll` call manually and do whatever they want to do before/after it.

Note: `CombinerHelper` needs to be mutable because none of its methods are const. This can be revisited later.

Depends on D158710

Reviewed By: aemerson, dsanders

Differential Revision: https://reviews.llvm.org/D158713
2023-09-05 08:19:05 +02:00
Matt Arsenault
65b40f273f RegAlloc: Rename MLRegalloc* files to use consistent captalization
The other regalloc related files use RegAlloc, not Regalloc.
2023-09-03 09:00:27 -04:00
Fangrui Song
678e3ee123 [lldb] Fix duplicate word typos; NFC
Those fixes were taken from https://reviews.llvm.org/D137338
2023-09-01 21:32:24 -07:00
Fangrui Song
111fcb0df0 [llvm] Fix duplicate word typos. NFC
Those fixes were taken from https://reviews.llvm.org/D137338
2023-09-01 18:25:16 -07:00
LLVM GN Syncbot
d06bd25524 [gn build] Port e0829739bc77 2023-09-01 23:34:49 +00:00
LLVM GN Syncbot
79d06eba71 [gn build] Port 885d7b759b5c 2023-09-01 16:44:38 +00:00
LLVM GN Syncbot
b5f041f1fe [gn build] Port 1f9eff100ce8 2023-09-01 16:44:37 +00:00
Matt Arsenault
ad9d13d535 SelectionDAG: Swap operands of atomic_store
Irritatingly, atomic_store had operands in the opposite order from
regular store. This made it difficult to share patterns between
regular and atomic stores.

There was a previous incomplete attempt to move atomic_store into the
regular StoreSDNode which would be better.

I think it was a mistake for all atomicrmw to swap the operand order,
so maybe it's better to take this one step further.

https://reviews.llvm.org/D123143
2023-08-31 17:30:10 -04:00
Nick Desaulniers
e0447ce13d Revert "[llvm][docs] commit phabricator patch"
This reverts commit ef4beb8bc76f9d40b7e680cb0c2c7474d80f5a77.

It also removes the prior note about needing to patch ``arcanist``.

This is patch is no longer necessary:
1. arcanist came out of hibernation and updated to support PHP 8.1.
   https://github.com/phacility/arcanist/commits/master
2. llvm/llvm-project is moving to github pull requests starting Sept 1
   (tomorrow).
   https://discourse.llvm.org/t/pull-request-migration-schedule/71595

Fixes: #64470

Reviewed By: MaskRay

Differential Revision: https://reviews.llvm.org/D159291
2023-08-31 14:25:15 -07:00
LLVM GN Syncbot
b8f60c6998 [gn build] Port c01794e7ae8e 2023-08-31 20:11:24 +00:00
Nico Weber
1ae1d7764e [gn] port 54d0cf58fb5ecd more
The commit already updated the flags passed to tblgen,
so this here only needs to update the file lists.
2023-08-31 09:57:02 -04:00
pvanhout
54d0cf58fb [TableGen] Remove & Replace old GICombiner Backend
The MatchTable-based GlobalISel Combiner backend is the new default. There are no in-tree users left of the old backend.

- Removed implementation of old MatchDAG-based Combiner, including tests, the backend itself and all supporting code.
- Renamed MatchTable backend to `GlobalISelCombinerEmitter.cpp` + removed "-matchtable" from its CL option.
    - no need to have a verbose name as it's the only backend left now.

Reviewed By: aemerson

Differential Revision: https://reviews.llvm.org/D158710
2023-08-31 13:16:07 +02:00