Repository navigation
LLVM Vulkan 1.1.0 — Drop-in Standard LLVM Passes (GVN, CSE, CFG, DCE) & Clang Integration
LLVM Vulkan version 1.1.0 expands the project from a scoped compute prototype into a full, drop-in replacement pipeline for LLVM middle-end optimization passes, with automatic hook-in support for Clang -O2/-O3 compilations.
What's New in 1.1.0
- Cross-Block Dominator GVN (
lv-gvn/gvn): Connected the Vulkan GPU dense dominator matrix solver (dominators_rounds.comp,dominators_local_banked.comp) intoGVNPassto eliminate common subexpressions across basic blocks dominated by the definition. - Commutative CSE Canonicalization: Normalized operand IDs for commutative operations (
add,mul,and,or,xor,eq,ne) before hashing so that reversed operand pairs (a + bandb + a) produce matching candidate hashes and are deduplicated. - Drop-in Standard Pass Aliasing: Standard LLVM pass names (
early-cse,gvn,simplifycfg,dce,adce,instcombine) are registered as aliases to allow direct invocation in standard-passes=...pipelines. - Automatic Clang Pipeline Integration: Implemented EP (Extension Point) callbacks (
registerPipelineStartEPCallback,registerPipelineEarlySimplificationEPCallback,registerOptimizerLastEPCallback) so thatclang -fpass-plugin=LLVMVulkan.so -O2automatically hooks into the compilation pipeline whenLV_AUTO_INSERT=1. - End-to-End Native Compilation Verification: Validated full pipeline from
opt->llc->gcc-> native binary execution with 100% semantic equivalence. - Test Suite Expansion: Added
tests/llvm/gvn.llandtests/llvm/cse_commutative.ll. All 19 fixtures, 8,192 constant oracle cases, and semantic fuzzing passed with 0 errors.
Usage Example
# Standard opt invocation using standard pass names:
opt -load-pass-plugin=LLVMVulkan.so -passes='early-cse,gvn,simplifycfg,dce' input.ll -S -o output.ll
# Automatic Clang -O2 integration:
export LV_AUTO_INSERT=1
clang -fpass-plugin=LLVMVulkan.so -O2 -c main.c -o main.oVerified Assets
LLVMVulkan-1.1.0-Windows-AMD64.zip(MSVC Release static library, tools, headers, CMake configs)LLVMVulkan-1.1.0-Linux-x86_64.tar.gz(Linux shared library, tools, headers, CMake configs)SHA256SUMS(checksum manifest)