[flang-commits] [PATCH] D88981: [flang] Rework host runtime folding and enable REAL(2) folding with it.
Jean Perier via Phabricator via flang-commits
flang-commits at lists.llvm.org
Tue Oct 13 08:45:26 PDT 2020
jeanPerier updated this revision to Diff 297874.
jeanPerier marked 2 inline comments as done.
jeanPerier added a comment.
Remove static_assert from StaticMultimapView
The last update added a compile time assert that the array
is sorted before constructing a StaticMultimapView. It worked well with clang
but was actually most likely illegal C++ and failed with g++ since there is
no way to guarantee that the content of the array passed in template argument
is constexpr (only its address is guaranteed to be so). Clang++ seems to be
clever enough to propagate the constexpr aspect of the array address it gets
in template argument, but this is not standard C++.
Instead Verify() has to be called next to every instantiation of the map
where it is visible to the compiler that the map was built at compile time...
Also avoid the early return since constexpr functions should only have one return.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D88981/new/
https://reviews.llvm.org/D88981
Files:
flang/include/flang/Common/static-multimap-view.h
flang/include/flang/Evaluate/common.h
flang/include/flang/Evaluate/intrinsics-library.h
flang/lib/Evaluate/fold-complex.cpp
flang/lib/Evaluate/fold-implementation.h
flang/lib/Evaluate/fold-real.cpp
flang/lib/Evaluate/host.h
flang/lib/Evaluate/intrinsics-library-templates.h
flang/lib/Evaluate/intrinsics-library.cpp
flang/lib/Lower/IntrinsicCall.cpp
flang/runtime/pgmath.h.inc
flang/test/Evaluate/folding02.f90
flang/unittests/Evaluate/folding.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D88981.297874.patch
Type: text/x-patch
Size: 78580 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/flang-commits/attachments/20201013/531fcb41/attachment-0001.bin>
More information about the flang-commits
mailing list