Revision tags: llvmorg-18.1.8, llvmorg-18.1.7 |
|
#
597ac471 |
| 18-May-2024 |
Nicolai Hähnle <nicolai.haehnle@amd.com> |
update_test_checks: match IR basic block labels (#88979)
Labels are matched using a regexp of the form '^(pattern):', which
requires the addition of a "suffix" concept to NamelessValue.
Aside fr
update_test_checks: match IR basic block labels (#88979)
Labels are matched using a regexp of the form '^(pattern):', which
requires the addition of a "suffix" concept to NamelessValue.
Aside from that, the key challenge is that block labels are values, and
we typically capture values including the prefix '%'. However, when
labels appear at the start of a basic block, the prefix '%' is not
included, so we must capture block label values *without* the prefix
'%'.
We don't know ahead of time whether an IR value is a label or not. In
most cases, they are prefixed by the word "label" (their type), but this
isn't the case in phi nodes. We solve this issue by leveraging the
two-phase nature of variable generalization: the first pass finds all
occurences of a variable and determines whether the '%' prefix can be
included or not. The second pass does the actual substitution.
This change also unifies the generalization path for assembly with that
for IR and analysis, in the hope that any future changes avoid diverging
those cases future.
I also considered the alternative of trying to detect the phi node case
using more regular expression special cases but ultimately decided
against that because it seemed more fragile, and perhaps the approach of
keeping a tentative prefix that may later be discarded could also be
eventually applied to some metadata and attribute cases.
Note that an early version of this change was reviewed as
https://reviews.llvm.org/D142452, before version numbers were
introduced. This is a substantially updated version of that change.
show more ...
|
Revision tags: llvmorg-18.1.6, llvmorg-18.1.5, llvmorg-18.1.4, llvmorg-18.1.3, llvmorg-18.1.2, llvmorg-18.1.1, llvmorg-18.1.0, llvmorg-18.1.0-rc4, llvmorg-18.1.0-rc3, llvmorg-18.1.0-rc2, llvmorg-18.1.0-rc1, llvmorg-19-init, llvmorg-17.0.6, llvmorg-17.0.5, llvmorg-17.0.4, llvmorg-17.0.3, llvmorg-17.0.2, llvmorg-17.0.1, llvmorg-17.0.0, llvmorg-17.0.0-rc4, llvmorg-17.0.0-rc3, llvmorg-17.0.0-rc2, llvmorg-17.0.0-rc1, llvmorg-18-init, llvmorg-16.0.6, llvmorg-16.0.5, llvmorg-16.0.4 |
|
#
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.3, llvmorg-16.0.2, llvmorg-16.0.1, llvmorg-16.0.0, llvmorg-16.0.0-rc4, 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 ...
|
Revision tags: llvmorg-15.0.7, llvmorg-15.0.6, llvmorg-15.0.5, llvmorg-15.0.4, llvmorg-15.0.3, working, llvmorg-15.0.2, llvmorg-15.0.1, llvmorg-15.0.0, llvmorg-15.0.0-rc3, llvmorg-15.0.0-rc2, llvmorg-15.0.0-rc1, llvmorg-16-init, llvmorg-14.0.6, llvmorg-14.0.5, llvmorg-14.0.4, llvmorg-14.0.3, llvmorg-14.0.2 |
|
#
f15c6021 |
| 22-Apr-2022 |
Mircea Trofin <mtrofin@google.com> |
[UpdateTestChecks] Auto-generate stub bodies for unused prefixes
This is scoped to autogenerated tests.
The goal is to support having each RUN line specify a list of check-prefixes where one can sp
[UpdateTestChecks] Auto-generate stub bodies for unused prefixes
This is scoped to autogenerated tests.
The goal is to support having each RUN line specify a list of check-prefixes where one can specify potentially redundant prefixes. For example, for X86, if one specified prefixes for both AVX1 and AVX2, and the codegen happened to match today, one of the prefixes would be used and the onther one not. If the unused prefix were dropped, and later, codegen differences were introduced, one would have to go figure out where to add what prefix (paraphrasing https://lists.llvm.org/pipermail/llvm-dev/2021-February/148326.html)
To avoid getting errors due to unused prefixes, whole directories can be opted out (as discussed on that thread), but that means that tests that aren't autogenerated in such directories could have undetected unused prefix bugs.
This patch proposes an alternative that both avoids the above, dir-level optout, and supports the main autogen scenario discussed first. The autogen tool appends at the end of the test file the list of unused prefixes, together with a note explaining that is the case. Each prefix is set up to always pass.
This way, unexpected unused prefixes are easily discoverable, and expected cases "just work".
Differential Revision: https://reviews.llvm.org/D124306
show more ...
|
#
37a68497 |
| 12-May-2022 |
Alex Richardson <alexrichardson@google.com> |
[update_llc_test_checks] Use FileCheck captures for MCInst/MCReg output
To avoid test churn when backends add/rename new instructions/registers, it makes sense to use FileCheck captures for the exac
[update_llc_test_checks] Use FileCheck captures for MCInst/MCReg output
To avoid test churn when backends add/rename new instructions/registers, it makes sense to use FileCheck captures for the exact MCInst/Reg number. This is motivated by D125307, where I use --asm-show-inst to differentiate the output for multiple instructions with the same mnemonic.
This does not quite fix the churn issue yet: While files with the generated checks will be immune to the numbers changing, the update script test still suffers from this problem since the number is encoded in the FileCheck variable name. I plan to address this in a follow-up patch.
Reviewed By: MaskRay
Differential Revision: https://reviews.llvm.org/D125307
show more ...
|
#
8e43cbab |
| 15-Apr-2022 |
Daniil Kovalev <daniil@kovalev.website> |
[UpdateTestChecks] Add NVPTX support in update_llc_test_checks.py
This patch makes possible generating NVPTX assembly check lines with update_llc_test_checks.py utility.
Differential Revision: http
[UpdateTestChecks] Add NVPTX support in update_llc_test_checks.py
This patch makes possible generating NVPTX assembly check lines with update_llc_test_checks.py utility.
Differential Revision: https://reviews.llvm.org/D122986
show more ...
|
Revision tags: llvmorg-14.0.1, llvmorg-14.0.0, llvmorg-14.0.0-rc4, llvmorg-14.0.0-rc3, llvmorg-14.0.0-rc2 |
|
#
8565b6f9 |
| 01-Mar-2022 |
Yatao Wang <ningxinr@live.cn> |
[UpdateLLCTestChecks] Add support for isel debug output in update_llc_test_checks.py
Add a check on run lines to pick up isel options in llc commands and allow generating check lines of isel final o
[UpdateLLCTestChecks] Add support for isel debug output in update_llc_test_checks.py
Add a check on run lines to pick up isel options in llc commands and allow generating check lines of isel final output other than assembly. If llc command line contains -debug-only=isel, update_llc_test_checks.py will try to scrub isel output, otherwise, the script will fall back on default behaviour, which is try to scrub assembly output instead.
The motivation of this change is to allow usage of update_llc_test_checks.py to autogenerate checks of instruction selection results. In this way, we can detect errors at an earlier stage before the compilation goes all the way to assembly. It is an example of having some transparency for the stages between IR and assembly. These generated tests are almost like "unit tests" of isel stage.
This patch only implements the initial change to differentiate isel output from assembly output for Lanai. Other targets will not be supported for isel check generation at the moment. Although adding support for it will only require implementing the function regex and scrubber for corresponding targets.
The Lanai implementation was chosen mainly for the simplicity of demonstrating the difference between isel checks and asm checks.
This patch also do not include the implementation of function prefix, which is required for the generated isel checks to pass. I will put up a follow up revision for the function prefix change to complete isel support.
Reviewed By: Flakebi
Differential Revision: https://reviews.llvm.org/D119368
show more ...
|