[all-commits] [llvm/llvm-project] 6e54a5: Preserve the address space for llvm.used and llvm....

nawalcopty via All-commits all-commits at lists.llvm.org
Tue Apr 25 13:07:23 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 6e54a57c61af6a959210f3628df9e21e3d7033f5
      https://github.com/llvm/llvm-project/commit/6e54a57c61af6a959210f3628df9e21e3d7033f5
  Author: Nawal Copty <nawal.copty at intel.com>
  Date:   2023-04-25 (Tue, 25 Apr 2023)

  Changed paths:
    M llvm/lib/Transforms/IPO/GlobalOpt.cpp
    A llvm/test/Transforms/GlobalOpt/global-opt-addrspace.ll

  Log Message:
  -----------
  Preserve the address space for llvm.used and llvm.compiler.used global variables in GlobalOpt pass.

The llvm.used (or llvm.compiler.used) global variable is an array that contains a list of pointers to global variables and functions.

The GlobalOpt (Global Variable Optimizer) pass is not preserving the address space for llvm.used and llvm.compiler.used global variables.This patch updates the setUsedInitializer() function in GlobalOpt.cpp, so the address space is preserved.

Reviewed By: aeubanks

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




More information about the All-commits mailing list