This cleanup action only needs to be performed once when the entire optimization is converged. Doing it in every iteration has a very high time-complexity, as it queries every dbg value in a dense map Compare before and after for one internal source file with many basic blocks   >90% reduction in this extreme case.
123 KiB
123 KiB