[flang] Fold MAXVAL & MINVAL
authorpeter klausler <pklausler@nvidia.com>
Tue, 15 Jun 2021 22:18:41 +0000 (15:18 -0700)
committerpeter klausler <pklausler@nvidia.com>
Wed, 16 Jun 2021 21:06:34 +0000 (14:06 -0700)
commit47f18af55fd59e813144cc76711806d57a160e50
tree9570373c4ce4d1d0c1669ca1feed2f469cfbe46a
parent46446e398b5202303280d9e18676c07529f1d0b0
[flang] Fold MAXVAL & MINVAL

Implement constant folding for the reduction transformational
intrinsic functions MAXVAL and MINVAL.

In anticipation of more folding work to follow, with (I hope)
some common infrastructure, these two have been implemented in a
new header file.

Differential Revision: https://reviews.llvm.org/D104337
13 files changed:
flang/include/flang/Evaluate/call.h
flang/include/flang/Evaluate/integer.h
flang/include/flang/Evaluate/shape.h
flang/include/flang/Evaluate/tools.h
flang/lib/Evaluate/fold-character.cpp
flang/lib/Evaluate/fold-implementation.h
flang/lib/Evaluate/fold-integer.cpp
flang/lib/Evaluate/fold-real.cpp
flang/lib/Evaluate/fold-reduction.h [new file with mode: 0644]
flang/lib/Evaluate/shape.cpp
flang/lib/Evaluate/tools.cpp
flang/runtime/reduction.cpp
flang/test/Evaluate/folding20.f90 [new file with mode: 0644]