[PATCH] D75201: [ThinLTO/LowerTypeTests] Handle unpromoted local type ids

Teresa Johnson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Mar 2 09:30:24 PST 2020


tejohnson added a comment.

In D75201#1901135 <https://reviews.llvm.org/D75201#1901135>, @evgeny777 wrote:

>


Thanks for tracking this down! I haven't reproduced yet, can you send me the bitcode file while I continue to try to repro? A couple questions below.

> @tejohnson I think, I found the reason of crash, described in  https://reviews.llvm.org/D73242#1893744. There is the following sequence of instructions in VirtualFileSystem.cpp.obj:
> 
>   store i32 (...)** bitcast ({ [5 x i8*] }* @"??_7RealFile@?A0x1AE555D7@@6B@" to i32 (...)**), i32 (...)*** %1, align 8, !dbg !36936, !tbaa !15844
>   ...
>   %3 = tail call i1 @llvm.type.test(i8* bitcast ({ [5 x i8*] }* @"??_7RealFile@?A0x1AE555D7@@6B@" to i8*), metadata !"1$f8264c715b0bffc7d68899cd8e73067d") #8, !dbg !36937
>   tail call void @llvm.assume(i1 %3) #8, !dbg !36937
>    
> 
> The only users of VTable `??_7RealFile@?A0x1AE555D7@@6B@` are store instructions which is not reflected in summary index.

There should be a summary reference of this vtable on the function with the store. But I'm not sure how that helps with this:

> This causes type.test not being eliminated during WPD and then lowering to `false` during LTT.

We would not eliminate in WPD only if its Type ID ("1$f8264c715b0bffc7d68899cd8e73067d")  has a use on type metadata, in which case it should presumably not be Unsat in LTT.

> So far we get unreachable in the linked image.

This should happen if the type ID has no use on type metadata, but then I think it should be removed by WPD.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D75201/new/

https://reviews.llvm.org/D75201





More information about the llvm-commits mailing list