[flang-commits] [flang] [flang] Add ETIME runtime and lowering intrinsics implementation (PR #90578)
Michael Klemm via flang-commits
flang-commits at lists.llvm.org
Tue Apr 30 04:29:26 PDT 2024
================
@@ -1340,6 +1340,12 @@ static const IntrinsicInterface intrinsicSubroutine[]{
{"values", AnyInt, Rank::vector, Optionality::optional,
common::Intent::Out}},
{}, Rank::elemental, IntrinsicClass::impureSubroutine},
+ {"etime",
+ {{"values", TypePattern{RealType, KindCode::exactKind, 4}, Rank::vector,
+ Optionality::required, common::Intent::Out},
+ {"time", TypePattern{RealType, KindCode::exactKind, 4},
+ Rank::scalar, Optionality::required, common::Intent::Out}},
+ {}, Rank::elemental, IntrinsicClass::impureSubroutine},
----------------
mjklemm wrote:
This only supports the `call etime(ta, ti)` pattern of the `ETIME` intrinsic. However, it also has a function form `ti = etime(at)`. Support for this would also be needed, as it's being used by applications (despite being discouraged by the GFortran docs). I was struggling with this, when I tried to make both forms work, as it seems the standard code-gen handlers only support either one.
https://github.com/llvm/llvm-project/pull/90578
More information about the flang-commits
mailing list