[all-commits] [llvm/llvm-project] 4e5d9c: [Internalize] Preserve variables externally initia...

darkbuck via All-commits all-commits at lists.llvm.org
Thu Jul 8 07:49:12 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 4e5d9c88033f1fc5d5206a02d8303bc6de43cf2b
      https://github.com/llvm/llvm-project/commit/4e5d9c88033f1fc5d5206a02d8303bc6de43cf2b
  Author: Michael Liao <michael.hliao at gmail.com>
  Date:   2021-07-08 (Thu, 08 Jul 2021)

  Changed paths:
    M clang/test/CodeGenCUDA/host-used-device-var.cu
    M clang/test/CodeGenCUDA/unused-global-var.cu
    M llvm/lib/Transforms/IPO/Internalize.cpp
    A llvm/test/Transforms/Internalize/externally-initialized.ll

  Log Message:
  -----------
  [Internalize] Preserve variables externally initialized.

- ``externally_initialized`` variables would be initialized or modified
  elsewhere. Particularly, CUDA or HIP may have host code to initialize
  or modify ``externally_initialized`` device variables, which may not
  be explicitly referenced on the device side but may still be used
  through the host side interfaces. Not preserving them triggers the
  elimination of them in the GlobalDCE and breaks the user code.

Reviewed By: yaxunl

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




More information about the All-commits mailing list