[all-commits] [llvm/llvm-project] 782dd1: [SPIRV] Do not emit @llvm.compiler.used (#162678)

Juan Manuel Martinez Caamaño via All-commits all-commits at lists.llvm.org
Tue Oct 14 00:04:34 PDT 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 782dd178fcb3b146dd16792b54c867095b863ccc
      https://github.com/llvm/llvm-project/commit/782dd178fcb3b146dd16792b54c867095b863ccc
  Author: Juan Manuel Martinez Caamaño <jmartinezcaamao at gmail.com>
  Date:   2025-10-14 (Tue, 14 Oct 2025)

  Changed paths:
    M llvm/lib/Target/SPIRV/SPIRVAsmPrinter.cpp
    M llvm/lib/Target/SPIRV/SPIRVEmitIntrinsics.cpp
    A llvm/test/CodeGen/SPIRV/llvm-compiler-used.ll

  Log Message:
  -----------
  [SPIRV] Do not emit @llvm.compiler.used (#162678)

`@llvm.compiler.used` holds a series of global values and prevents the compiler from optimizing them out.

However, the symbols in the variable can be optimized after compilation
as usual by a linker (notice that `@llvm.used` instead doesn't allow for
the linker to optimize-out the global variables referenced in it).

This was already done for `@llvm.global.annotations`.



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list