Skip to content
Commit 2bb5535b authored by Alexey Bader's avatar Alexey Bader
Browse files

[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: default avatarMikhail Lychkov <mikhail.lychkov@intel.com>

Differential Revision: https://reviews.llvm.org/D122163
parent 355dbd3b
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment