[llvm] [LoopUnroll] Remove redundant debug instructions after blocks have been merged (PR #91246)

Arthur Eubanks via llvm-commits llvm-commits at lists.llvm.org
Wed May 8 11:25:22 PDT 2024


https://github.com/aeubanks commented:

this seems like it would still run into a similar issue where we may repeatedly call `RemoveRedundantDbgInstrs` on some set of growing dbg instructions, if loop-unroll manages to create a bunch of mergeable blocks. can we ensure that we only call it on an instruction at most once by calling `RemoveRedundantDbgInstrs` not every time we merge a block, but on a set of merged blocks?

e.g. if we merge A->B->C, then D->E->F, we should call `RemoveRedundantDbgInstrs` on C once we see we can't merge C->D, and then we call `RemoveRedundantDbgInstrs` on F when we're done (and we saw that F did indeed have a block merged into it)

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


More information about the llvm-commits mailing list