[llvm] [RemoveDIs] Add iterator-taking constructors and Create methods (PR #82778)

Jeremy Morse via llvm-commits llvm-commits at lists.llvm.org
Mon Feb 26 03:44:05 PST 2024


jmorse wrote:

> Are there remaining uses in LLVM? If so, should those be updated now/immediately?

Many many uses, all this patch does is add the alternatives (see the discourse topic for RemoveDIs, they're already needed, oops).

> When should they be removed?

Two competing narratives:
 * People downstream need time to fix up their passes, we should go slow and gently,
 * Using the wrong inserter risks producing the wrong debug-info, in rare case compiler-crashes, and it's better to fix everything up rapidly rather than having "death by a thousand cuts"

I feel like the latter is more persuasive, especially as the fix for 99% of scenarios is entirely mechanical, i.e. call `getIterator` or don't-dereference-the-iterator.

https://github.com/llvm/llvm-project/pull/82778


More information about the llvm-commits mailing list