[all-commits] [llvm/llvm-project] e01c7d: [LowerGlobalDtors] Skip __cxa_atexit call complete...

Sam Clegg via All-commits all-commits at lists.llvm.org
Mon Oct 23 10:08:21 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: e01c7d54b4b05764adc546900009af03dced99a2
      https://github.com/llvm/llvm-project/commit/e01c7d54b4b05764adc546900009af03dced99a2
  Author: Sam Clegg <sbc at chromium.org>
  Date:   2023-10-23 (Mon, 23 Oct 2023)

  Changed paths:
    M lld/test/wasm/init-fini-no-gc.ll
    M lld/test/wasm/init-fini.ll
    M llvm/lib/Transforms/Utils/LowerGlobalDtors.cpp
    A llvm/test/Transforms/LowerGlobalDestructors/lower-global-dtors-unused.ll

  Log Message:
  -----------
  [LowerGlobalDtors] Skip __cxa_atexit call completely when arg0 is unused (#68758)

In emscripten we have a build mode (the default actually) where the
runtime never exits and therefore `__cxa_atexit` is a dummy/stub
function that does nothing. In this case we would like to be able
completely DCE any otherwise-unused global dtor functions.

Fixes: https://github.com/emscripten-core/emscripten/issues/19993




More information about the All-commits mailing list