[all-commits] [llvm/llvm-project] 2bb553: [StripDeadDebugInfo] Drop dead CUs

Alexey Bader via All-commits all-commits at lists.llvm.org
Sun Sep 11 01:34:21 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 2bb5535b58edb04358e58495b302c9613b101227
      https://github.com/llvm/llvm-project/commit/2bb5535b58edb04358e58495b302c9613b101227
  Author: Alexey Bader <alexey.bader at intel.com>
  Date:   2022-09-11 (Sun, 11 Sep 2022)

  Changed paths:
    M llvm/lib/Transforms/IPO/StripSymbols.cpp
    A llvm/test/Transforms/StripSymbols/strip-cu-with-dangling-subprogram.ll

  Log Message:
  -----------
  [StripDeadDebugInfo] Drop dead CUs

In situations when a submodule is extracted from big module (i.e. using
CloneModule) a lot of debug info is copied via metadata nodes. Despite of
the fact that part of that info is not linked to any instruction in extracted
IR file, StripDeadDebugInfo pass doesn't drop them.
Strengthen criteria for debug info that should be kept in a module:
- Only those compile units are left that referenced by a subprogram debug info
node that is attached to a function definition in the module or to an instruction
in the module that belongs to an inlined function.

Signed-off-by: Mikhail Lychkov <mikhail.lychkov at intel.com>

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




More information about the All-commits mailing list