[PATCH] D85099: [UpdateTestChecks] Match unnamed values like "@[0-9]+" and "![0-9]+"
Johannes Doerfert via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Aug 4 14:49:01 PDT 2020
jdoerfert 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 !']
----------------
MaskRay wrote:
> MaskRay wrote:
> > 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', '@', ...], ...`
> Tuples should be better: `[('TMP', '%', r'[\w.-]+?'), ('GLOBAL', '@', ...), ...]`
I thought about it afterwards as well. Will make it a class so it's easier to see what is what.
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