aboutsummaryrefslogtreecommitdiff
path: root/llvm/utils/UpdateTestChecks/common.py
diff options
context:
space:
mode:
authorRamkumar Ramachandra <ramkumar.ramachandra@codasip.com>2024-07-03 10:50:52 +0100
committerGitHub <noreply@github.com>2024-07-03 10:50:52 +0100
commit915ee0b823a528456226de513f303483d5fe0793 (patch)
tree1ff34f8aa10890e267322f22f81374724b46f244 /llvm/utils/UpdateTestChecks/common.py
parentedbbc832a5308e4f6943583965e74254799f13ae (diff)
downloadllvm-915ee0b823a528456226de513f303483d5fe0793.zip
llvm-915ee0b823a528456226de513f303483d5fe0793.tar.gz
llvm-915ee0b823a528456226de513f303483d5fe0793.tar.bz2
UTC: support debug output from LDist (#93208)
Tweak the LoopDistribute debug output to be prefixed with "LDist: ", get it to be stable, and extend update_analyze_test_checks.py trivially to support this output.
Diffstat (limited to 'llvm/utils/UpdateTestChecks/common.py')
-rw-r--r--llvm/utils/UpdateTestChecks/common.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/llvm/utils/UpdateTestChecks/common.py b/llvm/utils/UpdateTestChecks/common.py
index 85c1294..eb212ed 100644
--- a/llvm/utils/UpdateTestChecks/common.py
+++ b/llvm/utils/UpdateTestChecks/common.py
@@ -569,7 +569,7 @@ ANALYZE_FUNCTION_RE = re.compile(
flags=(re.X | re.S),
)
-LV_DEBUG_RE = re.compile(
+LOOP_PASS_DEBUG_RE = re.compile(
r"^\s*\'(?P<func>[\w.$-]+?)\'[^\n]*" r"\s*\n(?P<body>.*)$", flags=(re.X | re.S)
)
@@ -973,6 +973,7 @@ class NamelessValue:
name (as in e.g. `@some_global` or `%x`) or just a number (as in e.g. `%12`
or `!4`).
"""
+
def __init__(
self,
check_prefix,
@@ -1635,8 +1636,9 @@ def generalize_check_lines(
regexp = ginfo.get_regexp()
multiple_braces_re = re.compile(r"({{+)|(}}+)")
+
def escape_braces(match_obj):
- return '{{' + re.escape(match_obj.group(0)) + '}}'
+ return "{{" + re.escape(match_obj.group(0)) + "}}"
if ginfo.is_ir():
for i, line in enumerate(lines):