[llvm-dev] RFC: FileCheck Enhancements

Mehdi Amini via llvm-dev llvm-dev at lists.llvm.org
Thu May 26 08:49:16 PDT 2016



> On May 26, 2016, at 8:01 AM, Elena Lepilkina via llvm-dev <llvm-dev at lists.llvm.org> wrote:
> 
> But then I should write
> // CHECK: something
> // SSE: something
> // SSE3: something

I don't see why you need this? Why cant you only write:

// CHECK: something.

And all these will match it:

FileCheck
FileCheck --check-prefix=CHECK --check-prefix=SSE 
FileCheck --check-prefix=CHECK --check-prefix=SSE --check-prefix=SSE2
FileCheck --check-prefix=CHECK --check-prefix=SSE --check-prefix=SSE2 --check-prefix=SSE3

-- 
Mehdi



>  
> With this feature it can be write // {{[A-Z0-9]+}} : something
>  
> From: James Y Knight [mailto:jyknight at google.com] 
> Sent: Thursday, May 26, 2016 5:53 PM
> To: Ehsan Amiri <ehsanamiri at gmail.com>
> Cc: Elena Lepilkina <Elena.Lepilkina at synopsys.com>; llvm-dev <llvm-dev at lists.llvm.org>
> Subject: Re: [llvm-dev] RFC: FileCheck Enhancements
>  
>  
>  
> On Thu, May 26, 2016 at 10:35 AM, Ehsan Amiri via llvm-dev <llvm-dev at lists.llvm.org <mailto:llvm-dev at lists.llvm.org>> wrote:
> 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.
> 
>  
>  
>  
> I, too, think wildcard and regular expression for prefixes will make it hard to read the test files. Currently I can highlight the prefix and focus on a specific test, but that won't be possible when these features are used. I prefer an easy to read but long test file to a hard to read but compact one.
>  
>  
> It's also an entirely unnecessary feature: you can use multiple --check-prefix arguments on the test run to accomplish the same thing, and many tests do that today. (e.g. "FileCheck --check-prefix=CHECK --check-prefix=SSE --check-prefix=SSE3").
>  
> _______________________________________________
> 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/f564f2e3/attachment.html>


More information about the llvm-dev mailing list