[llvm] [WebAssembly] Avoid scanning unrelated debug values (NFCI) (PR #218378)
Heejin Ahn via llvm-commits
llvm-commits at lists.llvm.org
Tue Aug 25 17:04:02 PDT 2026
aheejin wrote:
I read https://00f.net/2026/08/19/why-compiling-rust-to-webassembly-is-slow/, and have a few questions:
> The catch is that, while moving values, Register Stackify can point an existing `DBG_VALUE` at a different register without moving the record itself.
> And after enough copies, a record near the top of the block can refer to a register defined near the bottom.
> ...
> After copies, some records can sit above the definition.
When does this happen? Does this happen within RegStackify or before? In RegStackify, because we always sink attendant `DBG_VALUE`s with the def (or when they can't be sunk, nullify the `DBG_VALUE`s so they don't refer to the register anymore), that shouldn't happen, right?
I think this patch is useful even if this doesn't happen though, because there can be `DBG_VALUE`s that belong to the previous definition of the same register within the same BB.
https://github.com/llvm/llvm-project/pull/218378
More information about the llvm-commits
mailing list