[PATCH] D79882: [FileCheck] Add saturation support to numerical expressions.

Thomas Preud'homme via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu May 14 07:32:33 PDT 2020


thopre added a comment.

In D79882#2035379 <https://reviews.llvm.org/D79882#2035379>, @paulwalker-arm wrote:

> I'll admit the syntax comes from laziness, or rather trying to implement the feature within the confines of the current design with minimal effort.  Implementing real function support seemed like a considerable undertaking because then it opens up having to distinguish between function names and variable names (e.g. when parentheses are also used to define scope and precedence) plus nested function calls.
>
> The current design suggested a simple left to right parsing structure so that's what I went with.  The naming supports this because min suggests picking between multiple operands, whereas usat_high is an operation applied to a single operand.
>
> I can investigate the function route but I cannot help but wonder if we'll just get to the point where it's better to use an existing language parser than invent a new one.


Yes that would be better, but I suspect it would have to be something provided by LLVM to not bring a huge dependency for a small tool. The current parsing code is my own fault and stems from my inexperience in the domain of parsing.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D79882





More information about the llvm-commits mailing list