[PATCH] D111337: [fir] Add array value copy pass
Mehdi AMINI via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Oct 14 21:27:03 PDT 2021
mehdi_amini added a comment.
Without getting into a "100%" coverage mode, this revision is adding a lot of code in `include/flang/Optimizer/Builder/` and separately a pass with what looks like minimal testing.
Just looking at the pass itself, there are many so many special cases and handling, but the existing test case seems like just the basic?
Now the code in the Builder directory is as large as the pass itself, what kind of testing / coverage do we have for that?
I wonder if the "array copy value" Pass is really the best way to provide testing for everything else here: could we have some test pass that showcase / exercise more specifically these components for example?
================
Comment at: flang/lib/Optimizer/Transforms/ArrayValueCopy.cpp:752
+ auto assignElement = [&](mlir::Value coor) {
+ auto input = update.merge();
+ if (auto inEleTy = fir::dyn_cast_ptrEleTy(input.getType())) {
----------------
(elsewhere too)
================
Comment at: flang/lib/Optimizer/Transforms/ArrayValueCopy.cpp:755
+ [[maybe_unused]] auto outEleTy =
+ fir::unwrapSequenceType(update.getType());
+ if (auto inChrTy = inEleTy.dyn_cast<fir::CharacterType>()) {
----------------
`unwrapSequenceType` is a pure function: move this in the assert?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D111337/new/
https://reviews.llvm.org/D111337
More information about the llvm-commits
mailing list