Basic-block split — split¶
Increases CFG complexity by splitting each basic block into multiple sub-blocks connected by
unconditional branches. A cheap structural multiplier — it inflates the block count that later CFG
passes (bcf, flattening) then operate on.
Options¶
| Key | Default | Range | Meaning |
|---|---|---|---|
num / n |
5 | 2–10 | Split factor. Higher values create more blocks. |
Example¶
__attribute__((annotate("obf: split(num=6)")))
int f(int x) { int a = x*3+7; for (int i=0;i<x;i++) a += (i^a); return a; }
On the shared 18-block sample function, split(num=6) expands the CFG from 18 to 54 blocks —
more surface for downstream opaque predicates and dispatchers.
Feed the CFG passes
split on its own is weak (the extra edges are unconditional). Its value is as a pre-pass:
run it before bcf/flattening so those passes have many more blocks to inject predicates and
dispatcher cases into.