[llvm-branch-commits] [SPIRV] Pass optLevel to InstructionSelect (PR #217929)
via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Fri Aug 21 11:24:42 PDT 2026
llvmorg-github-actions[bot] wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-backend-spir-v
Author: Aiden Grossman (boomanaiden154)
<details>
<summary>Changes</summary>
Canonical with all other targets (minus m68k which I will fix next).
Seems to have been dropped in eab7d3639b3c6dc9dda9a0ab1643f0e45ad2d9d6
accidentally when introducing the InstructionSelect subclass to avoid
the need for RegBankSelect.
---
Full diff: https://github.com/llvm/llvm-project/pull/217929.diff
2 Files Affected:
- (modified) llvm/lib/Target/SPIRV/SPIRVTargetMachine.cpp (+1-1)
- (modified) llvm/test/CodeGen/SPIRV/llc-pipeline.ll (-5)
``````````diff
diff --git a/llvm/lib/Target/SPIRV/SPIRVTargetMachine.cpp b/llvm/lib/Target/SPIRV/SPIRVTargetMachine.cpp
index 67875a924446d..6dc1aaa7615df 100644
--- a/llvm/lib/Target/SPIRV/SPIRVTargetMachine.cpp
+++ b/llvm/lib/Target/SPIRV/SPIRVTargetMachine.cpp
@@ -288,6 +288,6 @@ static cl::opt<bool> SPVEnableNonSemanticDI(
// Add the custom SPIRVInstructionSelect from above.
bool SPIRVPassConfig::addGlobalInstructionSelect() {
- addPass(new InstructionSelect(CodeGenOptLevel::Default, false));
+ addPass(new InstructionSelect(getOptLevel(), false));
return false;
}
diff --git a/llvm/test/CodeGen/SPIRV/llc-pipeline.ll b/llvm/test/CodeGen/SPIRV/llc-pipeline.ll
index c57945255a1f6..d79ee80286122 100644
--- a/llvm/test/CodeGen/SPIRV/llc-pipeline.ll
+++ b/llvm/test/CodeGen/SPIRV/llc-pipeline.ll
@@ -17,7 +17,6 @@
; SPIRV-O0-NEXT:Library Function Lowering Analysis
; SPIRV-O0-NEXT:Create Garbage Collector Module Metadata
; SPIRV-O0-NEXT:Assumption Cache Tracker
-; SPIRV-O0-NEXT:Profile summary info
; SPIRV-O0-NEXT:Machine Branch Probability Analysis
; SPIRV-O0-NEXT: ModulePass Manager
; SPIRV-O0-NEXT: Pre-ISel Intrinsic Lowering
@@ -63,10 +62,6 @@
; SPIRV-O0-NEXT: Legalizer
; SPIRV-O0-NEXT: SPIRV post legalizer
; SPIRV-O0-NEXT: Analysis for ComputingKnownBits
-; SPIRV-O0-NEXT: Dominator Tree Construction
-; SPIRV-O0-NEXT: Cycle Info Analysis
-; SPIRV-O0-NEXT: Lazy Branch Probability Analysis
-; SPIRV-O0-NEXT: Lazy Block Frequency Analysis
; SPIRV-O0-NEXT: InstructionSelect
; SPIRV-O0-NEXT: ResetMachineFunction
; SPIRV-O0-NEXT: Finalize ISel and expand pseudo-instructions
``````````
</details>
https://github.com/llvm/llvm-project/pull/217929
More information about the llvm-branch-commits
mailing list