[all-commits] [llvm/llvm-project] c1d586: [AMDGPU] Call the `FINI_ARRAY` destructors in the ...

Joseph Huber via All-commits all-commits at lists.llvm.org
Fri Nov 10 07:34:18 PST 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: c1d5865a313d0a8a254b37c852bdd444453c0f73
      https://github.com/llvm/llvm-project/commit/c1d5865a313d0a8a254b37c852bdd444453c0f73
  Author: Joseph Huber <jhuber6 at vols.utk.edu>
  Date:   2023-11-10 (Fri, 10 Nov 2023)

  Changed paths:
    M llvm/lib/Target/AMDGPU/AMDGPUCtorDtorLowering.cpp
    M llvm/test/CodeGen/AMDGPU/lower-ctor-dtor-constexpr-alias.ll
    M llvm/test/CodeGen/AMDGPU/lower-ctor-dtor.ll
    M llvm/test/CodeGen/AMDGPU/lower-multiple-ctor-dtor.ll

  Log Message:
  -----------
  [AMDGPU] Call the `FINI_ARRAY` destructors in the correct order (#71815)

Summary:
The AMDGPU backend uses the linker-provided INIT_ARRAY and FINI_ARRAY
sections to call all the global constructors in a single kernel.
Previously this mistakenly used the same iteration logic for both
arrays. The destructors stored in FINI_ARRAY are stored in the same
order as
the ones in the INIT_ARRAY section so we need to traverse it in reverse
order.




More information about the All-commits mailing list