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

Michael Liao michael.liao at intel.com
Wed Apr 24 14:34:12 PDT 2013


On Wed, 2013-04-24 at 14:21 -0700, Jakob Stoklund Olesen wrote:
> On Apr 24, 2013, at 11:35 AM, Michael Liao <michael.liao at intel.com> wrote:
> 
> > 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.
> 
> I think you can do it a lot simpler. You don't have to defer the DAG matches, they should already be topologically ordered in the input file. If you process them in order, all your variables should be defined before use.

That means the match patterns cannot be written in any order (as long as
the linkage through variable names is valid.) Tester must put them in
one of valid topology orders. More rigorous tests make sense to me (if
no one else disagree) and it really simplify it a lot.

- michael

> 
> Thanks,
> /jakob
> 





More information about the llvm-commits mailing list