[flang] Avoid copyin/copyout if the actual argument is contiguous at runtime
authorValentin Clement <clementval@gmail.com>
Fri, 2 Sep 2022 07:46:01 +0000 (09:46 +0200)
committerValentin Clement <clementval@gmail.com>
Fri, 2 Sep 2022 07:47:53 +0000 (09:47 +0200)
commit4ed30c81d36d4518c63e951fe4b2e4df5a19fd0e
treeeb5ca86342616b2b5219271070f7dc3b21196659
parentc453e5b901ccaf9e7102575d6b14f190acc703be
[flang] Avoid copyin/copyout if the actual argument is contiguous at runtime

This patch adds contiguity check with the runtime to avoid copyin/copyout
in case the actual argument is actually contiguous.

Reviewed By: jeanPerier

Differential Revision: https://reviews.llvm.org/D133097
flang/lib/Lower/ConvertExpr.cpp
flang/test/Lower/call-by-value-attr.f90
flang/test/Lower/call-copy-in-out.f90
flang/test/Lower/dummy-argument-optional-2.f90
flang/test/Lower/optional-value-caller.f90