[BasicBlockUtils] Remove redundant llvm.dbg instructions after blocks to reduce compile time (#89069)
this patch is to fix the compile time for some cases, before this
change, some targets (riscv-64, ve) will spend much more compile time on
this case (https://godbolt.org/z/rrov17cTo). With this change, the
compile time was reduced a lot.
Fixes https://github.com/llvm/llvm-project/issues/89073
PR: https://github.com/llvm/llvm-project/pull/89069