Add LLVM optimizer (#104)

* Add LLVM optimizer

* expr_pass: add bpf_passthrough attributes to make tests pass
This commit is contained in:
varunrmallya
2026-09-23 21:05:33 +05:30
committed by GitHub
parent 8290fecac2
commit 3179549760
5 changed files with 93 additions and 12 deletions

View File

@ -72,6 +72,10 @@ class CompilationContext:
# Helper management
self.scratch_pool = ScratchPoolManager()
# Sequence numbers for llvm.bpf.passthrough barriers; each call needs a
# distinct one so the optimizer cannot CSE two barriers together.
self.passthrough_seq = 0
# Vmlinux handling (optional, specialized)
self.vmlinux_handler = None # Can be VmlinuxHandler instance