build basic block map