Passes¶
Kagura is built on the LLVM New Pass Manager. Each transformation is a
separate pass; you enable them individually via -kagura-<name> flags or
through a JSON policy file.
Passes are grouped by purpose:
- Control Flow — flatten the CFG, inject bogus branches, split / reorder basic blocks, redirect calls.
- Data Obfuscation — encrypt strings, constants, globals, and alloca'd values.
- Anti-Analysis — detect debuggers / hooking frameworks, verify integrity, hide symbols.
- Platform-Specific — ObjC selector / class obfuscation, JNI dynamic registration, VM virtualization.
- Infrastructure — DWARF control, config loader, symbol map, audit log.
See also:
- Before / After Examples — what the IR / decompiler output actually looks like.
- Performance & Size Impact — measured overhead on a representative mobile game module.
- Pass Order — the deterministic pipeline registered
via
registerOptimizerLastEPCallback. - Tuning Parameters —
bcf-prob,seed, iteration counts, symbol filters.