[PATCH] Add support to FileCheck for out-of-order matching

Michael Liao michael.liao at intel.com
Wed Apr 24 11:35:46 PDT 2013


Here's the revised patch achieving that goal. When a match is deferred,
we will check whethe that check string has DAG strings and match them
first. If all of them could match, we will match that check string again
starting from the end of DAG string matchings. I kept the logic checking
DAG string once a check string itself could match as it will reduce the
range to verify for DAG strings. How do you think that? I could remove
it if we think it's unnecessary.

There's one feature might be useful. (I disabled it in both patches
now.) Is it valueable to mix CHECK-NOT and CHECK-DAG together?

Yours
- Michael


On Wed, 2013-04-24 at 10:05 -0700, Jakob Stoklund Olesen wrote:
> Hi Michael,
> 
> Thanks for working on this!
> 
> On Apr 22, 2013, at 5:49 PM, Michael Liao <michael.liao at intel.com> wrote:
> 
> > Jakob, for the example you raised, it might be necessary for testers to
> > rewrite it from
> > 
> > 	1: CHECK: testfunctionname
> >        2: CHECK-DAG: add [[REG1:r[0-9]+]], r1, r2
> >        3: CHECK-DAG: add [[REG2:r[0-9]+]], r3, r4
> >        4: CHECK: mul [[REG1]], [[REG2]]
> > 
> > to
> > 
> > 	1: CHECK: testfunctionname
> >        2: CHECK-DAG: add [[REG1]], r1, r2
> >        3: CHECK-DAG: add [[REG2]], r3, r4
> >        4: CHECK: mul [[REG1:r[0-9]+]], [[REG2:r[0-9]+]]
> 
> 
> As we discussed on the thread, this probably becomes too confusing, and it isn't actually necessary.
> 
> CHECK-DAGs can simply search to the end of the file, they don't need a following anchor point.
> 
> A CHECK following a set of CHECK-DAGs should begin its search after the CHECK-DAG that matches the latest text.
> 
> /jakob
> 

-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Add-CHECK-DAG-support.patch
Type: text/x-patch
Size: 17391 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20130424/63bca90e/attachment.bin>


More information about the llvm-commits mailing list