Basic block height calculation