aboutsummaryrefslogtreecommitdiff
path: root/llvm/utils/UpdateTestChecks/common.py
diff options
context:
space:
mode:
authorRoman Lebedev <lebedev.ri@gmail.com>2022-04-15 15:37:29 +0300
committerRoman Lebedev <lebedev.ri@gmail.com>2022-04-15 15:37:29 +0300
commit8fbed6870bb290d8f62840b3bb29c16ffec7f3ed (patch)
tree7c19a0e70d5cb8fbc6fe3c9e874ad01c77fc2cff /llvm/utils/UpdateTestChecks/common.py
parent4dba3d4c539f5ffa025d6dc356862dff3e70784f (diff)
downloadllvm-8fbed6870bb290d8f62840b3bb29c16ffec7f3ed.zip
llvm-8fbed6870bb290d8f62840b3bb29c16ffec7f3ed.tar.gz
llvm-8fbed6870bb290d8f62840b3bb29c16ffec7f3ed.tar.bz2
[UpdateTestChecks] Prevent rapid onset insanity when forced to write LoopVectorize-driven costmodel tests
Subj, or on other words, we have a lot of tests that are driven by the LoopVectorizer's debug output, but we don't have any meaningful way to autogenerate checklines in them, which means that an insurmountable amount of manual work is required when modifying the appropriate cost models. That is not sustainable, so this presents a solution. Reviewed By: RKSimon Differential Revision: https://reviews.llvm.org/D121133
Diffstat (limited to 'llvm/utils/UpdateTestChecks/common.py')
-rw-r--r--llvm/utils/UpdateTestChecks/common.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/llvm/utils/UpdateTestChecks/common.py b/llvm/utils/UpdateTestChecks/common.py
index 7ff3e3a..3e66ca9 100644
--- a/llvm/utils/UpdateTestChecks/common.py
+++ b/llvm/utils/UpdateTestChecks/common.py
@@ -303,6 +303,11 @@ ANALYZE_FUNCTION_RE = re.compile(
r'\s*\n(?P<body>.*)$',
flags=(re.X | re.S))
+LV_DEBUG_RE = re.compile(
+ r'^\s*\'(?P<func>[\w.$-]+?)\'[^\n]*'
+ r'\s*\n(?P<body>.*)$',
+ flags=(re.X | re.S))
+
IR_FUNCTION_RE = re.compile(r'^\s*define\s+(?:internal\s+)?[^@]*@"?([\w.$-]+)"?\s*\(')
TRIPLE_IR_RE = re.compile(r'^\s*target\s+triple\s*=\s*"([^"]+)"$')
TRIPLE_ARG_RE = re.compile(r'-mtriple[= ]([^ ]+)')