[all-commits] [llvm/llvm-project] 4a1236: [AMDGPU] Add an option to disable manual ctor / dt...

Joseph Huber via All-commits all-commits at lists.llvm.org
Tue May 23 07:03:28 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 4a1236e0f66341c1fcf2cd8a3e9a1b6faaf1a4d5
      https://github.com/llvm/llvm-project/commit/4a1236e0f66341c1fcf2cd8a3e9a1b6faaf1a4d5
  Author: Joseph Huber <jhuber6 at vols.utk.edu>
  Date:   2023-05-23 (Tue, 23 May 2023)

  Changed paths:
    M llvm/lib/Target/AMDGPU/AMDGPUTargetMachine.cpp
    M llvm/test/CodeGen/AMDGPU/lower-ctor-dtor.ll

  Log Message:
  -----------
  [AMDGPU] Add an option to disable manual ctor / dtor lowering

Currently AMDGPU offers extra ctor / dtor lowering by emitting a kernel
that can be called. It's possible to handle ctors and dtors using the
standard method as shown in D149340's commit message. In which case we
on't need these extra kernels as they won't be called. This patch simply
adds a way to conditionally turn off this handling if we do not want to
get extra kernels in the output.

Unrelated, but we could convert this handling to an ODR function that simply
calls the code in D149340 constructed via LLVM-IR. That would handle priority
correctly and would then be correct if not run in LTO mode.

Reviewed By: yaxunl

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




More information about the All-commits mailing list