[flang] Speed up folding of LEN_TRIM()
authorPeter Klausler <pklausler@nvidia.com>
Mon, 10 Oct 2022 21:42:16 +0000 (14:42 -0700)
committerPeter Klausler <pklausler@nvidia.com>
Sat, 29 Oct 2022 20:26:42 +0000 (13:26 -0700)
commit39f6d8334522ee5baefeae49be5bf1a3d6163e9f
treee846b285511587ec7c670b1adced7339c89dc8f1
parent619b5bfc8dfa90fff327956cc8cf5bb9d4029bab
[flang] Speed up folding of LEN_TRIM()

LEN_TRIM's folding is currently based on VERIFY(), and it is kind of
slow for the very large CHARACTER arguments that can show up in artificial
test suites.  Rewrite in terms of single-character accesses.

Differential Revision: https://reviews.llvm.org/D136901
flang/lib/Evaluate/character.h