[flang-commits] [PATCH] D111281: [flang] More work on SYSTEM_CLOCK runtime API and implementation

Peter Klausler via Phabricator via flang-commits flang-commits at lists.llvm.org
Wed Oct 6 16:42:15 PDT 2021


klausler created this revision.
klausler added reviewers: rovka, vdonaldson.
klausler added a project: Flang.
Herald added a subscriber: jdoerfert.
Herald added a reviewer: sscalpone.
klausler requested review of this revision.

To get proper wrap-around behavior for the various kind parameter
values of the optional COUNT= and COUNT_MAX= dummy arguments to
the intrinsic subroutine SYSTEM_CLOCK, add an extra argument to
the APIs for lowering to pass the integer kind of the actual argument.
Avoid confusion by requiring that both actual arguments have the same
kind when both are present.  The results of the runtime functions
remain std::int64_t and lowering should still convert them before
storing to the actual argument variables.

Rework the implementation a bit to accomodate the dynamic
specification of the kind parameter, and to clean up some coding
issues with preprocessing and templates.

Use the kind of the COUNT=/COUNT_MAX= actual arguments to determine
the clock's resolution, where possible, in conformance with other
Fortran implementations.


https://reviews.llvm.org/D111281

Files:
  flang/docs/Extensions.md
  flang/include/flang/Runtime/time-intrinsic.h
  flang/lib/Evaluate/intrinsics.cpp
  flang/runtime/time-intrinsic.cpp
  flang/unittests/Runtime/Time.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D111281.377723.patch
Type: text/x-patch
Size: 16780 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/flang-commits/attachments/20211006/d29c8951/attachment-0001.bin>


More information about the flang-commits mailing list