[PATCH] D91761: [FileCheck] Add a literal check directive

Paul Robinson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Nov 20 07:04:49 PST 2020


probinson added a comment.

In D91761#2407164 <https://reviews.llvm.org/D91761#2407164>, @jpienaar wrote:

> In D91761#2407009 <https://reviews.llvm.org/D91761#2407009>, @probinson wrote:
>
>> I have to say, I'm not super enthused about this feature.  Typically we've added directives when there's no other way to achieve the desired effect
>
> SAME could be achieved without needing SAME, COUNT too, and NEXT could be folded in too by extending to multi-line regex and verifying no newlines so too DAG. So I believe there is a goal with directives to make checks readable for users & simple to interpret rather than just possible. Escaping is possible but obscures what is being tested and easy to get wrong.

Fair.  I'd forgotten about COUNT and that multi-line regexes are possible.  (Although I will point out that SAME does not always do the same thing as pasting the directives together with `.*` separators; see my "FileCheck Follies" lightning talk from the Fall 2016 Dev Meeting.)

"Easy to get wrong" is a worthwhile point too.

>> Does this excessive-escaping situation come up very often in practice?
>
> Very often indeed in MLIR as dense constants use [] pairs for values, so if you have a multi-dimensional tensor value you end up with a lot of escaping.

Okay.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D91761/new/

https://reviews.llvm.org/D91761



More information about the llvm-commits mailing list