[PATCH] D85099: [UpdateTestChecks] Match unnamed values like "@[0-9]+" and "![0-9]+"
Fangrui Song via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Aug 4 14:37:29 PDT 2020
MaskRay added inline comments.
================
Comment at: llvm/utils/UpdateTestChecks/common.py:304
+# subgroups) should work.
+NAMELESS_PREFIXES = [r'', r'', r'', 'TMP', 'GLOBAL', 'DEBUG', 'LOOP', 'ATTRIBUTES', 'TBAA']
+IR_VALUE_PREFIXES = [r'', r'', r'', '%', '@', '!dbg !', '!llvm.loop !', '#', '!tbaa !']
----------------
`[[ATTRIBUTES0:#.*]]` is very long. I wonder whether we should abbreviate it to `ATTR0` or the like.
================
Comment at: llvm/utils/UpdateTestChecks/common.py:304
+# subgroups) should work.
+NAMELESS_PREFIXES = [r'', r'', r'', 'TMP', 'GLOBAL', 'DEBUG', 'LOOP', 'ATTRIBUTES', 'TBAA']
+IR_VALUE_PREFIXES = [r'', r'', r'', '%', '@', '!dbg !', '!llvm.loop !', '#', '!tbaa !']
----------------
MaskRay wrote:
> `[[ATTRIBUTES0:#.*]]` is very long. I wonder whether we should abbreviate it to `ATTR0` or the like.
Instead of Structure of arrays, would it be better organizing these constants as Array of structures?
For example, you can write `['TMP', '%', r'[\w.-]+?'], ['GLOBAL', '@', ...], ...`
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D85099/new/
https://reviews.llvm.org/D85099
More information about the llvm-commits
mailing list