[flang-commits] [flang] [flang] Add ETIME runtime and lowering intrinsics implementation (PR #90578)

Michael Klemm via flang-commits flang-commits at lists.llvm.org
Wed May 1 08:32:08 PDT 2024


================
@@ -3230,6 +3235,22 @@ void IntrinsicLibrary::genExecuteCommandLine(
                                       exitstatBox, cmdstatBox, cmdmsgBox);
 }
 
+// ETIME
+void IntrinsicLibrary::genEtime(
+    llvm::ArrayRef<fir::ExtendedValue> args) {
+  assert(args.size() == 2);
+
+  mlir::Value values = fir::getBase(args[0]);
+  mlir::Value time = fir::getBase(args[1]);
+
+  if (!values)
+    fir::emitFatalError(loc, "expected VALUES parameter");
----------------
mjklemm wrote:

Yes, let's keep this PR focused on the `etime` intrinsic.  I will make a PR to clean this up (and also fix up the `elemental` issue with most of the intrinsics, as @klausler as noted correctly).

https://github.com/llvm/llvm-project/pull/90578


More information about the flang-commits mailing list