[all-commits] [llvm/llvm-project] 517385: [AMDGPU] Handle functions in llvm's global ctors a...
Reshabh Sharma via All-commits
all-commits at lists.llvm.org
Fri Aug 6 04:07:57 PDT 2021
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 5173854f1994a8cbeb1da0ca074e8f9bcff2be92
https://github.com/llvm/llvm-project/commit/5173854f1994a8cbeb1da0ca074e8f9bcff2be92
Author: Reshabh Sharma <Reshabhkumar.Sharma at amd.com>
Date: 2021-08-06 (Fri, 06 Aug 2021)
Changed paths:
M llvm/docs/AMDGPUUsage.rst
M llvm/lib/Target/AMDGPU/AMDGPU.h
A llvm/lib/Target/AMDGPU/AMDGPUCtorDtorLowering.cpp
M llvm/lib/Target/AMDGPU/AMDGPUHSAMetadataStreamer.cpp
M llvm/lib/Target/AMDGPU/AMDGPUTargetMachine.cpp
M llvm/lib/Target/AMDGPU/CMakeLists.txt
A llvm/test/CodeGen/AMDGPU/hsa-metadata-from-llvm-ctor-dtor-list.ll
M llvm/test/CodeGen/AMDGPU/llc-pipeline.ll
A llvm/test/CodeGen/AMDGPU/lower-ctor-dtor.ll
A llvm/test/CodeGen/AMDGPU/lower-multiple-ctor-dtor.ll
M llvm/utils/gn/secondary/llvm/lib/Target/AMDGPU/BUILD.gn
Log Message:
-----------
[AMDGPU] Handle functions in llvm's global ctors and dtors list
This patch introduces a new code object metadata field, ".kind"
which is used to add support for init and fini kernels.
HSAStreamer will use function attributes, "device-init" and
"device-fini" to distinguish between init and fini kernels from
the regular kernels and will emit metadata with ".kind" set to
"init" and "fini" respectively.
To reduce the number of init and fini kernels, the ctors and
dtors present in the llvm's global.ctors and global.dtors lists
are called from a single init and fini kernel respectively.
Reviewed by: yaxunl
Differential Revision: https://reviews.llvm.org/D105682
More information about the All-commits
mailing list