[llvm] [BasicBlockUtils] Remove redundant llvm.dbg instructions after blocks to reduce compile time (PR #89069)

via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 23 07:32:19 PDT 2024


coderchenlin wrote:

> > Please also add a loop-unroll test based on the issue.
> 
> @coderchenlin I might have missed it somewhere, but is it possible add a loop-unroll test based on the reproducer from #89073?

@fhahn, Thanks! I can add the IR case based on the reproducer from https://github.com/llvm/llvm-project/issues/89073, but I need some time to reduce the llvm-ir of the case. As @SLTozer said, the case is a little pathological, and the IR is also strange, I will try to reduce it and make it clearer 

Before that, if you want to check the effect of this patch,  please test this case  `llvm/test/Transforms/LoopUnroll/debug-info.ll ` with this command:
`opt runtime-loop1.ll -S -o - -passes=loop-unroll -debug-only=basicblock-utils `
it can remove 2 redundant llvm.dbg instructions.

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


More information about the llvm-commits mailing list