[PATCH] D103805: [flang] Define the runtime API for CPU_TIME

Eric Schweitz via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jun 7 07:17:57 PDT 2021


schweitz added inline comments.


================
Comment at: flang/runtime/time-intrinsic.h:21
+
+void RTNAME(CpuTime)(CppTypeFor<TypeCategory::Real, 8> &time,
+    const char *sourceFile = nullptr, int line = 0);
----------------
rovka wrote:
> IIUC, the default real kind is usually 4, but can be set to 8 with -fdefault-real-8. 
> 
> Should we have another overload for CppTypeFor<TypeCategory::Real, 4>, or can we assume that lowering can deal with downcasting if the default kind is 4?
Lowering handles cases which require floating-point format conversions when calling the runtime. That said, the runtime can (and often does) provide multiple interfaces, which may eliminate the necessity of such conversions.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D103805/new/

https://reviews.llvm.org/D103805



More information about the llvm-commits mailing list