[llvm-dev] RFC: FileCheck Enhancements
Elena Lepilkina via llvm-dev
llvm-dev at lists.llvm.org
Tue May 24 06:51:10 PDT 2016
Hi everyone,
There was idea to add new directives to FileCheck:
1. Directive to use some patterns as named template with or without parameters.
2. CHECK-INCLUDE - Directive to include other file with checks to another.
3. Expressions repeat for CHECK - If statement should be checked several times repeat modifiers {n}, {n,m} , {,n}, {n,}, *, + can be used.
4. Repeat in regexs - Repeat with current number should become available by using {n}, {n,m} , {,n}, {n,}
5. CHECK-LABEL-DAG - Not sequential order of labels.
6. Check statement for words only - // CHECK-WORD, // CHECK-WORD-NEXT, // CHECK-WORD-SAME, // CHECK-WORD-DAG, // CHECK-WORD-NOT.
7. Wildcard for prefixes - If some statements should be checked regardless prefix, it should be used //{{*}}, //{{*}}-NEXT, //{{*}}-SAME and etc.
8. Prefix with regular expressions - If statement should be checked if prefix matches some regular expression, it should be used {{regex}}:, {{regex}}-NEXT and etc.
More information in file https://docs.google.com/document/d/1wAKNzU7-S2EeK1-aADwgP8dEiKfByKNazonybCQW3zs/edit?usp=sharing.
Now we have prototype with these features. It's tested on LLVM 3.8.
There was found unsupported before directive in old test. Bug about this - https://llvm.org/bugs/show_bug.cgi?id=27852.
There is about 6% slowdown with new features when we tested them on 3.8.
I see that there are some changes in FileCheck LLVM 3.9 with new features too. We can publish patch for 3.8 and it can be adapted for LLVM 3.9. Is it interesting for anyone? And how will be better to publish patch as for 3.8 or for 3.9?
Thanks,
Elena.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20160524/fcfcd8f4/attachment.html>
More information about the llvm-dev
mailing list