[all-commits] [llvm/llvm-project] 0fb105: [SPIRV] Filter disallowed extensions for env (#150...

Steven Perron via All-commits all-commits at lists.llvm.org
Mon Aug 18 11:34:21 PDT 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 0fb1057e40110e558e0fef8e183e485c4d01311b
      https://github.com/llvm/llvm-project/commit/0fb1057e40110e558e0fef8e183e485c4d01311b
  Author: Steven Perron <stevenperron at google.com>
  Date:   2025-08-18 (Mon, 18 Aug 2025)

  Changed paths:
    M llvm/lib/Target/SPIRV/MCTargetDesc/SPIRVBaseInfo.cpp
    M llvm/lib/Target/SPIRV/MCTargetDesc/SPIRVBaseInfo.h
    M llvm/lib/Target/SPIRV/SPIRVCommandLine.cpp
    M llvm/lib/Target/SPIRV/SPIRVCommandLine.h
    M llvm/lib/Target/SPIRV/SPIRVSubtarget.cpp
    M llvm/lib/Target/SPIRV/SPIRVSymbolicOperands.td
    A llvm/test/CodeGen/SPIRV/extensions/enable-all-extensions-avoid-invalid.ll

  Log Message:
  -----------
  [SPIRV] Filter disallowed extensions for env (#150051)

Not all SPIR-V extensions are allows in every environment. When we use
the `-spirv-ext=all` option, the backend currently believes that all
extensions can be used.

This commit filters out the extensions on the command line to remove
those that are not known to be allowed for the current environment.

Alternatives considered: I considered modifying the
SPIRVExtensionsParser::parse to use a different list of extensions for
"all" depending on the target triple. However that does not work because
the target triple is not available, and cannot be made available in a
reasonable way.

Fixes #147717

---------

Co-authored-by: Victor Lomuller <victor at codeplay.com>



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