[flang] [llvm] [flang][flang-rt] Add support for non-standard TIMEF intrinsic (PR #185377)

Kelvin Li via llvm-commits llvm-commits at lists.llvm.org
Tue Mar 31 07:35:49 PDT 2026


================
@@ -1233,6 +1233,23 @@ PROGRAM example_time
 END PROGRAM
 ```
 
+### Non-Standard Intrinsics: TIMEF
+
+#### Description
+`TIMEF` returns the number of seconds that have elapsed since the first time TIMEF was called.
+The first time it is called, TIMEF returns 0.
+
+By default, the behaviour matches that of ifort and classic-flang compilers. To match 
+behaviour of compilers like XLF and nvfortran, use `export FLANG_TIMEF_IN_MILLISECONDS=1` to 
+ensure TIMEF returns number of milliseconds elapsed since the first time TIMEF() was called
----------------
kkwli wrote:

```suggestion
ensure TIMEF returns number of milliseconds elapsed since the first time TIMEF() was called.
```

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


More information about the llvm-commits mailing list