[all-commits] [llvm/llvm-project] 58645d: [OpenMP] Fix `omp_get_wtime` function being marked...

Joseph Huber via All-commits all-commits at lists.llvm.org
Tue Sep 6 10:59:22 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 58645d3252e883f2e61363552767ed1716634edf
      https://github.com/llvm/llvm-project/commit/58645d3252e883f2e61363552767ed1716634edf
  Author: Joseph Huber <jhuber6 at vols.utk.edu>
  Date:   2022-09-06 (Tue, 06 Sep 2022)

  Changed paths:
    M llvm/include/llvm/Frontend/OpenMP/OMPKinds.def
    M llvm/test/Transforms/OpenMP/add_attributes.ll

  Log Message:
  -----------
  [OpenMP] Fix `omp_get_wtime` function being marked incorrectly as readonly

OpenMP has a list of of optimistic attributes that can be attached to
known runtime functions to aid some analysis. The `omp_get_wtime`
function incorrectly used the `readonly` attribute. This is not correct
at the `omp_get_wtime` function changes values depending on some
external state. This is more correctly modeled with
`inaccessiblememonly` meaning that the value does not depend on anything
within the module, but can not be removes as it depends on external
state.

Fixes #57578

Reviewed By: tianshilei1992

Differential Revision: https://reviews.llvm.org/D133360




More information about the All-commits mailing list