Files
clang-p2996/llvm/lib/Target/AMDGPU/AMDGPUCtorDtorLowering.cpp
Joseph Huber a3bd87b100 [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.

Relanding after the revert in fe7b5e2cfc
using the IR builder interface instead of ConstantExpr.
2023-11-10 11:01:02 -06:00

7.2 KiB