[llvm-dev] RFC: FileCheck Enhancements
James Y Knight via llvm-dev
llvm-dev at lists.llvm.org
Thu May 26 09:13:33 PDT 2016
For all of these changes: why/where are they actually useful?
Previous enhancements of FileCheck have mostly been added when needed by a
test. It would greatly help your case for adding these new enhancements to
show some tests which would be improved, or have greater clarity, by the
use of these features.
I'm particularly skeptical about "3. Expressions repeat for CHECK",
"5. CHECK-LABEL-DAG",
and (as noted before "7. Wildcard for prefixes" and "8. Prefix with regular
expressions"
For "6. Check statement for words only" -- I think it might be better to
just make that be the ONLY behavior, rather than an additional option -- if
you intended to end a match in the middle of a word, stick {{[^ ]*}} on it.
On Tue, May 24, 2016 at 9:51 AM, Elena Lepilkina via llvm-dev <
llvm-dev at lists.llvm.org> wrote:
> 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.
>
> _______________________________________________
> LLVM Developers mailing list
> llvm-dev at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20160526/7a0e876e/attachment.html>
More information about the llvm-dev
mailing list