Build all basic blocks