[flang-commits] [PATCH] D104019: [flang] Add initial implementation for CPU_TIME

Diana Picus via Phabricator via flang-commits flang-commits at lists.llvm.org
Fri Jun 18 00:51:23 PDT 2021


rovka added a comment.

In D104019#2825717 <https://reviews.llvm.org/D104019#2825717>, @Meinersbur wrote:

> Could you please address the build failure mentioned in https://reviews.llvm.org/rG57e85622bbdb2eb18cc03df2ea457019c58f6912#inline-6002:

I am so sorry, I completely missed that thread! :(

> This fails with msvc <http://meinersbur.de:8011/#/builders/146/builds/699> which apparently optimized the loop away:
>
>   [ RUN      ] TimeIntrinsics.CpuTime
>   C:\Users\buildbot-worker\minipc-ryzen-win\flang-x86_64-windows\llvm-project\flang\unittests\RuntimeGTest\Time.cpp(34): error: Expected: (end) > (start), actual: 2.000000e-03 vs 2.000000e-03
>   [  FAILED  ] TimeIntrinsics.CpuTime (1 ms)
>
> I think assuming how long it takes to complete a volatile write is fragile.
>
> Instead I suggest to test CpuTime by repeatedly calling it until it changes.

Hmm, that's probably better - if it never changes then we'll timeout eventually, right? I'll try to commit that today.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D104019



More information about the flang-commits mailing list