[all-commits] [llvm/llvm-project] 6ed1ef: [Attributor][FIX] Pipe UsedAssumedInformation thro...

Johannes Doerfert via All-commits all-commits at lists.llvm.org
Wed Feb 16 12:54:01 PST 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 6ed1ef0643aa900c283a6f0428c72a0d387e5ccc
      https://github.com/llvm/llvm-project/commit/6ed1ef0643aa900c283a6f0428c72a0d387e5ccc
  Author: Johannes Doerfert <johannes at jdoerfert.de>
  Date:   2022-02-16 (Wed, 16 Feb 2022)

  Changed paths:
    M llvm/include/llvm/Transforms/IPO/Attributor.h
    M llvm/lib/Transforms/IPO/Attributor.cpp
    M llvm/lib/Transforms/IPO/AttributorAttributes.cpp
    M llvm/test/Transforms/Attributor/norecurse.ll
    M llvm/test/Transforms/OpenMP/custom_state_machines.ll

  Log Message:
  -----------
  [Attributor][FIX] Pipe UsedAssumedInformation through more interfaces

`UsedAssumedInformation` is a return argument utilized to determine what
information is known. Most APIs used it already but
`genericValueTraversal` did not. This adds it to `genericValueTraversal`
and replaces `AllCallSitesKnown` of `checkForAllCallSites` with the
commonly used `UsedAssumedInformation`.

This was supposed to be a NFC commit, then the test change appeared.
Turns out, we had one user of `AllCallSitesKnown` (AANoReturn) and the
way we set `AllCallSitesKnown` was wrong as we ignored the fact some
call sites were optimistically assumed dead. Included a dedicated test
for this as well now.

Fixes https://github.com/llvm/llvm-project/issues/53884


  Commit: 57b4c5267b7293b1990d8418477b24732ba0468b
      https://github.com/llvm/llvm-project/commit/57b4c5267b7293b1990d8418477b24732ba0468b
  Author: Johannes Doerfert <johannes at jdoerfert.de>
  Date:   2022-02-16 (Wed, 16 Feb 2022)

  Changed paths:
    M openmp/libomptarget/DeviceRTL/include/Mapping.h
    M openmp/libomptarget/DeviceRTL/src/Kernel.cpp
    M openmp/libomptarget/DeviceRTL/src/Mapping.cpp
    M openmp/libomptarget/DeviceRTL/src/State.cpp

  Log Message:
  -----------
  [OpenMP][FIX] Eliminate race on the IsSPMD global

The `IsSPMD` global can only be read by threads other than the main
thread *after* initialization is complete. To allow usage of
`mapping::getBlockSize` before initialization is done, we can pass the
`IsSPMD` state explicitly. This is similar to other APIs that take
`IsSPMD` explicitly to avoid such a race, e.g.,
`mapping::isInitialThreadInLevel0(IsSPMD)`

Fixes https://github.com/llvm/llvm-project/issues/53857


Compare: https://github.com/llvm/llvm-project/compare/67ab4c010b40...57b4c5267b72


More information about the All-commits mailing list