[all-commits] [llvm/llvm-project] 4c01a5: update_analyze_test_checks: support output from LA...
Ramkumar Ramachandra via All-commits
all-commits at lists.llvm.org
Tue Oct 31 07:34:07 PDT 2023
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 4c01a58008055aa8a7ce6e1a770216cd86664711
https://github.com/llvm/llvm-project/commit/4c01a58008055aa8a7ce6e1a770216cd86664711
Author: Ramkumar Ramachandra <Ramkumar.Ramachandra at imgtec.com>
Date: 2023-10-31 (Tue, 31 Oct 2023)
Changed paths:
M llvm/lib/Transforms/Scalar/LoopAccessAnalysisPrinter.cpp
M llvm/test/Analysis/LoopAccessAnalysis/forked-pointers.ll
M llvm/test/Analysis/LoopAccessAnalysis/loop-invariant-dep-with-backedge-taken-count.ll
M llvm/test/Analysis/LoopAccessAnalysis/max_safe_dep_dist_non_unit_stride.ll
M llvm/test/Analysis/LoopAccessAnalysis/pointer-phis.ll
M llvm/test/Analysis/LoopAccessAnalysis/symbolic-stride.ll
M llvm/test/Transforms/LoopUnroll/unroll-loop-invalidation.ll
A llvm/test/tools/UpdateTestChecks/update_analyze_test_checks/Inputs/dotvariable-laa.ll
A llvm/test/tools/UpdateTestChecks/update_analyze_test_checks/Inputs/dotvariable-laa.ll.expected
A llvm/test/tools/UpdateTestChecks/update_analyze_test_checks/Inputs/loop-access-analysis.ll
A llvm/test/tools/UpdateTestChecks/update_analyze_test_checks/Inputs/loop-access-analysis.ll.expected
A llvm/test/tools/UpdateTestChecks/update_analyze_test_checks/dotvariable-laa.test
A llvm/test/tools/UpdateTestChecks/update_analyze_test_checks/loop-access-analysis.test
M llvm/utils/UpdateTestChecks/common.py
M llvm/utils/update_analyze_test_checks.py
Log Message:
-----------
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.
More information about the All-commits
mailing list