History log of /llvm-project/llvm/utils/UpdateTestChecks/common.py (Results 26 – 50 of 159)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
# 31aebdd8 05-Dec-2023 James Y Knight <jyknight@google.com>

Include LLVM_VERSION_SUFFIX in the Clang version string. (#74469)

This causes current mainline to now report "18.0.0git" instead of
"18.0.0".

Fixes #53825


# 33111127 22-Nov-2023 Matthias Braun <matze@braunis.de>

Support BranchProbabilityInfo in update_analyze_test_checks.py (#72943)

- Change `BranchProbabilityPrinterPass` output to match expectations of `update_analyze_test_checks.py`.
- Add `Branch Probab

Support BranchProbabilityInfo in update_analyze_test_checks.py (#72943)

- Change `BranchProbabilityPrinterPass` output to match expectations of `update_analyze_test_checks.py`.
- Add `Branch Probability Analysis` to list of supported analyses.
- Process `llvm/test/Analysis/BranchProbabilityInfo/basic.ll` with `update_analyze_test_checks.py` as proof of concept. Leaving the other tests unchanged to reduce the amount of churn.

show more ...


Revision tags: llvmorg-17.0.5
# e6eda66c 13-Nov-2023 Henrik G. Olsson <hnrklssn@gmail.com>

Recommit changes to global checks (#71171)

Recommits the changes from https://reviews.llvm.org/D148216.
Explicitly named globals are now matched literally, instead of emitting
a capture group for

Recommit changes to global checks (#71171)

Recommits the changes from https://reviews.llvm.org/D148216.
Explicitly named globals are now matched literally, instead of emitting
a capture group for the name. This resolves #70047.
Metadata and annotations, on the other hand, are captured and matched
against by default, since their identifiers are not stable.

The reasons for revert (#63746) have been fixed:
The first issue, that of duplicated checkers, has already been resolved
in #70050.
This PR resolves the second issue listed in #63746, regarding the order
of named and unnamed globals. This is fixed by recording the index of
substrings containing global values, and sorting the checks according to
that index before emitting them. This results in global value checks
being emitted in the order they were seen instead of being grouped
separately.

show more ...


# 24839c32 09-Nov-2023 Florian Hahn <flo@fhahn.com>

[UTC] Escape multiple {{ or }} in input for check lines. (#71790)

SCEV expressions may contain multiple {{ or }} in the debug output,
which needs escaping.

See
llvm/test/Analysis/LoopAccessAnal

[UTC] Escape multiple {{ or }} in input for check lines. (#71790)

SCEV expressions may contain multiple {{ or }} in the debug output,
which needs escaping.

See
llvm/test/Analysis/LoopAccessAnalysis/loops-with-indirect-reads-and-writes.ll
for a test that needs escaping.

show more ...


# 4c01a580 31-Oct-2023 Ramkumar Ramachandra <Ramkumar.Ramachandra@imgtec.com>

update_analyze_test_checks: support output from LAA (#67584)

update_analyze_test_checks.py is an invaluable tool in updating tests.
Unfortunately, it only supports output from the CostModel,
Scala

update_analyze_test_checks: support output from LAA (#67584)

update_analyze_test_checks.py is an invaluable tool in updating tests.
Unfortunately, it only supports output from the CostModel,
ScalarEvolution, and LoopVectorize analyses. Many LoopAccessAnalysis
tests use hand-crafted CHECK lines, and it is moreover tedious to
generate these CHECK lines, as the output fom the analysis is not
stable, and requires the test-writer to hand-craft FileCheck matches.
Alleviate this pain, and support output from:

$ opt -passes='print<loop-accesses>'

This patch includes several non-trivial changes including:
- Preserving whitespace at the beginning of the line, so that the LAA
output can be properly indented.
- Regexes matching the unstable output, which is basically a pointer
address hex.
- Separating is_analyze from preserve_names clearly, as the former was
formerly used as an overload for the latter.

To demonstate the utility of this patch, several tests in
LoopAccessAnalysis have been auto-generated by
update_analyze_test_checks.py.

show more ...


Revision tags: llvmorg-17.0.4
# da28c330 30-Oct-2023 Henrik G. Olsson <hnrklssn@gmail.com>

[UTC] Recognise CHECK lines with globals matched literally (#70050)

Previously when using `-p` a.k.a. `--preserve-names` existing lines for
checking globals were not recognised as such, leading to

[UTC] Recognise CHECK lines with globals matched literally (#70050)

Previously when using `-p` a.k.a. `--preserve-names` existing lines for
checking globals were not recognised as such, leading to the line being
kept while also being emitted again, resulting in duplicated CHECK
lines.

This resolves #70048.

show more ...


Revision tags: llvmorg-17.0.3, llvmorg-17.0.2
# ac466c75 26-Sep-2023 Ramkumar Ramachandra <Ramkumar.Ramachandra@imgtec.com>

UpdateTestChecks: squelch warning on SCEV output (#67443)

update_analyze_test_checks.py currently outputs a warning when updating
a script with the run line:

$ opt -passes='print<scalar-evolut

UpdateTestChecks: squelch warning on SCEV output (#67443)

update_analyze_test_checks.py currently outputs a warning when updating
a script with the run line:

$ opt -passes='print<scalar-evolution>'

saying that the script doesn't support its output, when it indeed does,
as evidenced by several tests in test/Analysis/ScalarEvolution generated
by this script. There is even a test for update_analyze_test_checks that
makes sure that SCEV output is supported. Hence, squelch the warning.

While at it, rename the update_analyze_test_checks test from basic.ll to
a more explicit scev.ll.

show more ...


Revision tags: llvmorg-17.0.1, llvmorg-17.0.0, llvmorg-17.0.0-rc4, llvmorg-17.0.0-rc3
# 998c3239 21-Aug-2023 Jannik Silvanus <jannik.silvanus@amd.com>

[UTC] Keep function args parenthesis on label line (bumps version to 3)

If the function argument block contains patterns, we split argument
matching into a separate SAME line, because LABEL labels m

[UTC] Keep function args parenthesis on label line (bumps version to 3)

If the function argument block contains patterns, we split argument
matching into a separate SAME line, because LABEL labels may not contain
pattern matches.

Until now, in this case we moved the parenthesis opening the argument block
into the second line.

This generates incorrect labels in case function names are not prefix-free.

For example, for a function `foo` we generated:

CHECK-LABEL: foo
CHECK-SAME: (<args of foo>)

If the output also contains a function `foo.specialzied`, then the label for
`foo` can match `foo.specialized`, depending on output order.

This patch moves opening parenthesis to the first line, breaking common prefixes:

CHECK-LABEL: foo(
CHECK-SAME: <args of foo>)

Bump the UTC version to 3, and only move the parenthesis for version 3 and later.

Differential Revision: https://reviews.llvm.org/D158497

show more ...


# dcd4d0a7 20-Aug-2023 Johannes Doerfert <johannes@jdoerfert.de>

[UTC] Honor global-value-regex in UTC_ARGS

Without this we cannot update various clang OpenMP tests as the UTC_ARGS
version of -global-value-regex is simply ignored. The handling of the
flag should

[UTC] Honor global-value-regex in UTC_ARGS

Without this we cannot update various clang OpenMP tests as the UTC_ARGS
version of -global-value-regex is simply ignored. The handling of the
flag should be changed to be in line with others, I left TODOs for now.

show more ...


Revision tags: llvmorg-17.0.0-rc2, llvmorg-17.0.0-rc1, llvmorg-18-init
# b9f1df7a 14-Jul-2023 Johannes Doerfert <johannes@jdoerfert.de>

Revert "[UTC] Add fallback support for specific metadata, and check their defs"

This reverts commit 8a3fdf7b908978625e9a7e57fbb443e4e6f98976 as it is
broken. See https://github.com/llvm/llvm-project

Revert "[UTC] Add fallback support for specific metadata, and check their defs"

This reverts commit 8a3fdf7b908978625e9a7e57fbb443e4e6f98976 as it is
broken. See https://github.com/llvm/llvm-project/issues/63746.

Effectively fixes: https://github.com/llvm/llvm-project/issues/63746

show more ...


# 75836eb9 14-Jul-2023 Johannes Doerfert <johannes@jdoerfert.de>

Revert "[UTC] Fix git URL regex"

This reverts commit 6d64faf3b1d96f4dba8c2c46b8b65f1cc978e82b, as it is
built on top of https://reviews.llvm.org/D148216 which is broken.

See also https://github.com

Revert "[UTC] Fix git URL regex"

This reverts commit 6d64faf3b1d96f4dba8c2c46b8b65f1cc978e82b, as it is
built on top of https://reviews.llvm.org/D148216 which is broken.

See also https://github.com/llvm/llvm-project/issues/63746

show more ...


# c1b1c409 14-Jul-2023 Johannes Doerfert <johannes@jdoerfert.de>

Revert "[UTC] Generalize version regex"

This reverts commit 4488ee259064532dda24024a7e96037fe9a3c0d9, as it is
built on top of https://reviews.llvm.org/D148216 which is broken.

See also https://git

Revert "[UTC] Generalize version regex"

This reverts commit 4488ee259064532dda24024a7e96037fe9a3c0d9, as it is
built on top of https://reviews.llvm.org/D148216 which is broken.

See also https://github.com/llvm/llvm-project/issues/63746

show more ...


# 5b8b9b39 14-Jul-2023 Johannes Doerfert <johannes@jdoerfert.de>

Revert "[UTC] Adapt version matcher to glob CLANG_VENDOR"

This reverts commit 68f5d1be3d8f9b2ee2f25098203b24a32057b4e6 as it is
built on top of https://reviews.llvm.org/D148216 which is broken.

See

Revert "[UTC] Adapt version matcher to glob CLANG_VENDOR"

This reverts commit 68f5d1be3d8f9b2ee2f25098203b24a32057b4e6 as it is
built on top of https://reviews.llvm.org/D148216 which is broken.

See also https://github.com/llvm/llvm-project/issues/63746

show more ...


# c2bed2a1 03-Jul-2023 Paul Robinson <paul.robinson@sony.com>

[UTC] Add do-not-autogenerate capability

Differential Revision: https://reviews.llvm.org/D154383


# 68f5d1be 05-Jul-2023 Henrik G. Olsson <hnrklssn@gmail.com>

[UTC] Adapt version matcher to glob CLANG_VENDOR

Both the pattern for finding the clang version metadata, and the emitted
checker, are now more robust, to handle a vendor prefix.

Differential Revis

[UTC] Adapt version matcher to glob CLANG_VENDOR

Both the pattern for finding the clang version metadata, and the emitted
checker, are now more robust, to handle a vendor prefix.

Differential Revision: https://reviews.llvm.org/D154520

show more ...


# 4488ee25 05-Jul-2023 Nikita Popov <npopov@redhat.com>

[UTC] Generalize version regex

The suffix for the git revision may not be present (or may not be
a git revision).


# 6d64faf3 05-Jul-2023 Henrik G. Olsson <hnrklssn@gmail.com>

[UTC] Fix git URL regex

The previous git URL regex only matched SSH urls, starting with 'git@'.
If the repo was cloned using a https URL it would not match.

rdar://105239218


Revision tags: llvmorg-16.0.6, llvmorg-16.0.5, llvmorg-16.0.4, llvmorg-16.0.3, llvmorg-16.0.2
# 8a3fdf7b 14-Apr-2023 Henrik G. Olsson <hnrklssn@gmail.com>

[UTC] Add fallback support for specific metadata, and check their defs

This prevents update_cc_tests.py from emitting hard-coded identifiers
for metadata (global variable checkers still check hard-c

[UTC] Add fallback support for specific metadata, and check their defs

This prevents update_cc_tests.py from emitting hard-coded identifiers
for metadata (global variable checkers still check hard-coded
identifiers). Instead it emits regex checkers that match even if the
identifiers change. Also adds a new mode for --check-globals: instead of
simply being on or off, it now has the options 'none', 'smart' and
'all', with 'none' and 'all' corresponding to the previous modes.

The 'smart' mode only emits checks for global definitions referenced
in the IR or other metadata that itself has a definition checker
emitted, making the rule transitive. It does not emit checks for
attribute sets, since that is better checked by --check-attributes. This
mode is made the new default. To make the change in default mode
backwards compatible a version bump is introduced (to v3), and the
default remains 'none' in v1 & v2.

This will result in metadata checks being emitted more often, so filters
are added to not check absolute file paths and compiler version git
hashes.

rdar://105239218

show more ...


# b71edfaa 15-May-2023 Tobias Hieta <tobias@hieta.se>

[NFC][Py Reformat] Reformat python files in llvm

This is the first commit in a series that will reformat
all the python files in the LLVM repository.

Reformatting is done with `black`.

See more in

[NFC][Py Reformat] Reformat python files in llvm

This is the first commit in a series that will reformat
all the python files in the LLVM repository.

Reformatting is done with `black`.

See more information here:

https://discourse.llvm.org/t/rfc-document-and-standardize-python-code-style

Reviewed By: jhenderson, JDevlieghere, MatzeB

Differential Revision: https://reviews.llvm.org/D150545

show more ...


Revision tags: llvmorg-16.0.1, llvmorg-16.0.0, llvmorg-16.0.0-rc4
# fb309041 02-Mar-2023 Nikita Popov <npopov@redhat.com>

[UTC] Enable --function-signature by default

This patch enables --function-signature by default under --version 2
and makes --version 2 the default. This means that all newly created
tests will chec

[UTC] Enable --function-signature by default

This patch enables --function-signature by default under --version 2
and makes --version 2 the default. This means that all newly created
tests will check the function signature, while leaving old tests alone.

There's two motivations for this change:

* Without --function-signature, the generated check lines may fail
in a very hard to understand way if the test both includes a
function definition and a call to that function. (Though we could
address this by making the CHECK-LABEL stricter, without checking
the full signature.)
* This actually checks that uses of the arguments in the function
body use the correct argument, instead of matching against any
variable.

This is a replacement for D139006 and D140212 based on the
--version mechanism.

I did not include an opt-out flag --no-function-signature because
I'm not sure we need it. Would be happy to include it though,
if desired.

Differential Revision: https://reviews.llvm.org/D145149

show more ...


Revision tags: llvmorg-16.0.0-rc3, llvmorg-16.0.0-rc2, llvmorg-16.0.0-rc1, llvmorg-17-init
# a26d3031 24-Jan-2023 Nikita Popov <npopov@redhat.com>

[UTC] Include return type/attributes under --version 2

If --function-signature is used with --version 2, then also include
the return type/attributes in the check lines. This is the
implementation o

[UTC] Include return type/attributes under --version 2

If --function-signature is used with --version 2, then also include
the return type/attributes in the check lines. This is the
implementation of D133943 rebased on the --version mechanism from
D142473.

This doesn't bump the default version yet, because I'd like to do
that together with D140212 (which enables --function-signature by
default), as these changes seem closely related. For now this
functionality can be accessed by explicitly passing --version 2
to UTC.

Fixes https://github.com/llvm/llvm-project/issues/61058.

Differential Revision: https://reviews.llvm.org/D144963

show more ...


# ae691c38 04-Feb-2023 Shengchen Kan <shengchen.kan@intel.com>

[UpdateTestChecks][NFC] Share the code to get CHECK prefix between all scripts

Reviewed By: MaskRay

Differential Revision: https://reviews.llvm.org/D143307


# 5375b638 27-Jan-2023 Nikita Popov <npopov@redhat.com>

[UTC] Add --version argument

We have a number of pending changes to update_test_checks.py
(and friends) that are essentially blocked on test churn:
If the output of UTC for an existing flag combinat

[UTC] Add --version argument

We have a number of pending changes to update_test_checks.py
(and friends) that are essentially blocked on test churn:
If the output of UTC for an existing flag combination changes,
then the next time a test is regenerated, it will contain many
spurious changes. This makes changes to UTC default
behavior essentially impossible.

Examples of such changes are:

* D133943/D142373 want --function-signature to also check the
return type/attributes.
* D139006/D140212 want to make --function-signature the default
behavior.
* D142452 wants to add wildcards for block labels.

This patch tries to resolve this issue by adding a --version
argument, which works as follows:

* When regenerating an old test, the default version is 1.
* When generating a new test, the default version is the newest.
When an explicit version is specified, that of course wins.

This means that any currently existing tests will keep using
--version 1 format, while any new tests will automatically embed
--version N where N is the latest version, and then keep using
that test format from then on.

This patch only implements the --version flag without bumping
the default version, so it does not have any visible behavior
change by itself.

Differential Revision: https://reviews.llvm.org/D142473

show more ...


# 5b39387f 17-Jan-2023 Nicolai Hähnle <nicolai.haehnle@amd.com>

UpdateTestChecks: cleanup NamelessValues constructor

Remove global_ir_{prefix,prefix_regexp} (one of which is misnamed),
since they are really quite redundant with ir_{prefix,regexp} and
default the

UpdateTestChecks: cleanup NamelessValues constructor

Remove global_ir_{prefix,prefix_regexp} (one of which is misnamed),
since they are really quite redundant with ir_{prefix,regexp} and
default the is_before_functions argument, which basically just adds
noise to the table of NamelessValues.

Differential Revision: https://reviews.llvm.org/D142451

show more ...


# 72dc033f 19-Jan-2023 Nikita Popov <npopov@redhat.com>

[SROA] Check TBAA metadata in tests (NFC)

By switching to --check-globals. Also make sure that the
!tbaa.struct metadata mapping is preserved.


1234567