[all-commits] [llvm/llvm-project] a4e32a: [WebAssembly] Do nothing when sinking to same place

Heejin Ahn via All-commits all-commits at lists.llvm.org
Wed Mar 29 12:51:07 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: a4e32ae4cd97ce460e8695281f60ddb10cf510b2
      https://github.com/llvm/llvm-project/commit/a4e32ae4cd97ce460e8695281f60ddb10cf510b2
  Author: Heejin Ahn <aheejin at gmail.com>
  Date:   2023-03-29 (Wed, 29 Mar 2023)

  Changed paths:
    M llvm/lib/Target/WebAssembly/WebAssemblyDebugValueManager.cpp
    M llvm/lib/Target/WebAssembly/WebAssemblyDebugValueManager.h
    M llvm/test/DebugInfo/WebAssembly/dbg-value-reg-stackify.mir

  Log Message:
  -----------
  [WebAssembly] Do nothing when sinking to same place

In `DebugValueManager`, if a `Def` is requested to be sunk to the same
place (i.e., `Insert` is right after `Def`, not counting `DBG_VALUE`s)
currently we still do the sink. This can result in unnecessary creation
of `DBG_VALUE $noreg`. See comments for details. This CL detects this
case and do nothing and return, so we don't end up creating unnecessary
undef `DBG_VALUE`s.

Reviewed By: dschuff

Differential Revision: https://reviews.llvm.org/D146860




More information about the All-commits mailing list