[llvm-dev] RFC: FileCheck Enhancements

Elena Lepilkina via llvm-dev llvm-dev at lists.llvm.org
Wed May 25 00:04:53 PDT 2016


It's equivalent to {{\b}}whatever{{\b}}. I amn't sure if assertion \b is supported.
\s will not match with start and of line, but it should be matched.

Elena.

-----Original Message-----
From: Jonathan Roelofs [mailto:jonathan at codesourcery.com] 
Sent: Tuesday, May 24, 2016 5:14 PM
To: Elena Lepilkina <Elena.Lepilkina at synopsys.com>; llvm-dev <llvm-dev at lists.llvm.org>
Subject: Re: [llvm-dev] RFC: FileCheck Enhancements



On 5/24/16 8:10 AM, Elena Lepilkina wrote:
> Hi,
>
> CHECK-WORD - If you want find some string in file, but you want to be sure, that this string should be a separate word.

Is this functionally equivalent to doing:

// CHECK: {{\s}}whatever{{\s}}

Or is there some other subtlety about it?


Jon

>
> There are examples in file.
> Prefixes which can be described as regular expressions should be turning on with option -regex-prefixes . By default, you can't use it.
>
> Thanks for your comments.
>
> -----Original Message-----
> From: Jonathan Roelofs [mailto:jonathan at codesourcery.com]
> Sent: Tuesday, May 24, 2016 5:05 PM
> To: Elena Lepilkina <Elena.Lepilkina at synopsys.com>; llvm-dev 
> <llvm-dev at lists.llvm.org>
> Subject: Re: [llvm-dev] RFC: FileCheck Enhancements
>
>
>
> 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