[llvm-dev] RFC: FileCheck Enhancements

Jonathan Roelofs via llvm-dev llvm-dev at lists.llvm.org
Tue May 24 07:05:15 PDT 2016



On 5/24/16 7:51 AM, Elena Lepilkina via llvm-dev 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.

What does this ^ do?

>
> 7.Wildcard for prefixes - If some statements should be checked
> regardless prefix, it should be used //{{*}}, //{{*}}-NEXT, //{{*}}-SAME
> and etc.

I'm not a fan of this ^ feature. I think it'll make testcases much 
harder to understand.

>
> 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.

I'm not a fan of this ^ feature. I think it'll make testcases much 
harder to understand.

>
> 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?

Patches that apply on trunk are preferred (assuming the community 
accepts these changes).


Jon

>
> Thanks,
>
> Elena.
>
>
>
> _______________________________________________
> LLVM Developers mailing list
> llvm-dev at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev
>

-- 
Jon Roelofs
jonathan at codesourcery.com
CodeSourcery / Mentor Embedded


More information about the llvm-dev mailing list