[PATCH] D16440: [ThinLTO] Link in only necessary DICompileUnit operands

Teresa Johnson via llvm-commits llvm-commits at lists.llvm.org
Sat Jan 23 07:37:09 PST 2016


tejohnson added a comment.

In http://reviews.llvm.org/D16440#334379, @joker.eph wrote:

> So I debugged the assertion I see and the issue seems that we don't import anymore a retained type.
>
> `DwarfDebug::beginModule()` calls `TypeIdentifierMap = generateDITypeIdentifierMap(CU_Nodes);` to build (from the retained types list) a map from type name to matching DICompositeType.
>
> When emitting a DISubprogram, `getOrCreateSubprogramDIE` will call `resolve(SP->getScope())` which query the map. 
>  It seems that any scope for a DISubprogram needs to be in the retained types list, is it correct?


Is it the case that you can reach the SP and composite types from the retained type, but not vice versa? It sounds like it if it is building a map from retained type. In that case my change would not map those in (since the retained type list on the compile unit is no longer mapped, only things we can reach from the imported functions). I'll have to change the patch to build up the same type of map and then map in any retained types that map to something that was mapped in.

Anyone know offhand if there is anything else hanging off the compile unit that is like this?


http://reviews.llvm.org/D16440





More information about the llvm-commits mailing list