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

Michael Liao michael.liao at intel.com
Thu Apr 25 13:38:18 PDT 2013


On Thu, 2013-04-25 at 17:50 +0000, Robinson, Paul wrote:
> > >>> Is it valueable to mix CHECK-NOT and CHECK-DAG together?
> > >>
> > >> Hal, do you have any use cases where it would be useful to mix
> > >> CHECK-DAG and CHECK-NOT?
> > >
> > > Not currently; if I have CHECK-DAG then I can affirmatively check for
> > the instructions that I expect (regardless of order), and I can't think
> > of a case where I'd mix that with CHECK-NOT.
> > 
> > In that case, I think we should go with the simplest possible semantics
> > when mixing CHECK-DAG and CHECK-NOT.
> > 
> > To me, that is having CHECK-NOT act as a barrier, just like CHECK does.
> > CHECK-DAGs don't reorder across a CHECK-NOT.
> 
> But CHECK-NOT shouldn't match anything and so doesn't define a point
> in the output file?  So what does it mean to not reorder across a
> point that doesn't exist?
> 
> Or did you mean this:
>     CHECK-DAG: A
>     CHECK-DAG: B
>     CHECK-NOT: C
>     CHECK-DAG: D
>     CHECK-DAG: E
> that A/B are unordered wrt each other but both must appear before D/E?
> Seems like kind of an obscure usage.

That's my understanding, i.e. something should not happen between two
CHECK-DAGs or from CHECK-DAG to CHECK.

It's probably useful to check the case where edges (from variable defs
to variable uses) are not enough to validate scheduling constraints,
e.g. something invisible from instruction operands such as EFLAGS in
x86. However, I don't figure out concrete examples of such use yet.

- michael

> --paulr
> 
> 
> 
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits





More information about the llvm-commits mailing list