[Unroll] Refactor the accumulation of optimized instruction costs into