[all-commits] [llvm/llvm-project] cb66e1: Remove PlaceSafepoints pass

Philip Reames via All-commits all-commits at lists.llvm.org
Fri Oct 7 11:51:29 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: cb66e123c6bc82a793300b6fb3ecbed79c58f557
      https://github.com/llvm/llvm-project/commit/cb66e123c6bc82a793300b6fb3ecbed79c58f557
  Author: Philip Reames <preames at rivosinc.com>
  Date:   2022-10-07 (Fri, 07 Oct 2022)

  Changed paths:
    M llvm/docs/GarbageCollection.rst
    M llvm/docs/Statepoints.rst
    M llvm/include/llvm/InitializePasses.h
    M llvm/include/llvm/Transforms/Scalar.h
    M llvm/lib/Transforms/Scalar/CMakeLists.txt
    R llvm/lib/Transforms/Scalar/PlaceSafepoints.cpp
    M llvm/lib/Transforms/Scalar/Scalar.cpp
    R llvm/test/Transforms/PlaceSafepoints/basic.ll
    R llvm/test/Transforms/PlaceSafepoints/call-in-loop.ll
    R llvm/test/Transforms/PlaceSafepoints/finite-loops.ll
    R llvm/test/Transforms/PlaceSafepoints/libcall.ll
    R llvm/test/Transforms/PlaceSafepoints/memset.ll
    R llvm/test/Transforms/PlaceSafepoints/no-statepoints.ll
    R llvm/test/Transforms/PlaceSafepoints/split-backedge.ll
    R llvm/test/Transforms/PlaceSafepoints/statepoint-coreclr.ll
    R llvm/test/Transforms/PlaceSafepoints/statepoint-frameescape.ll
    M llvm/utils/gn/secondary/llvm/lib/Transforms/Scalar/BUILD.gn

  Log Message:
  -----------
  Remove PlaceSafepoints pass

This patch was added way back in the beginning of the work which became the statepoint infrastructure. The idea was that safepoints could be inserted late in the optimization pipeline. This is true if the only concern is garbage collection, but this approach turned out to be incompatible with the requirement to also support deoptimization at safepoints.

In theory, this pass would still be quite useful for an AOT compiled language which wants to support garbage collection, but we have no known users, and haven't for over 5 years. Time to remove unused code. If someone wants to use this, restoring it would not be hard. The immediate motivation for removal is that this is one of the last passes remaining which hasn't been ported to the new pass manager and the (straight forward) work to do so is not justified for unused code.

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




More information about the All-commits mailing list