compute spill cost for all vertices.