Basic block generation