This is an archive of the discontinued LLVM Phabricator instance.

[IR] Make TypeFinder aware of DIArgList values
ClosedPublic

Authored by dstenb on May 28 2021, 2:25 AM.

Details

Summary

TypeFinder did not find types under DIArgList. This resulted in a case
of invalid IR after GlobalOpt removed a global that was the only
non-DIArgList use of a struct type.

error: use of undefined type named 'struct.S'
  call void @llvm.dbg.value(metadata !DIArgList([1 x %struct.S]* undef, i64 %idxprom),
                                             metadata !24, metadata !DIExpression([...])), !dbg !26

Diff Detail

Event Timeline

dstenb created this revision.May 28 2021, 2:25 AM
dstenb requested review of this revision.May 28 2021, 2:25 AM
Herald added a project: Restricted Project. · View Herald TranscriptMay 28 2021, 2:25 AM
jmorse accepted this revision.May 28 2021, 3:15 AM

LGTM

llvm/test/Transforms/GlobalOpt/deadglobal-diarglist-use.ll
32–33

(We usually delete any un-necessary attributes for DI)

This revision is now accepted and ready to land.May 28 2021, 3:15 AM
dstenb added inline comments.May 28 2021, 8:12 AM
llvm/test/Transforms/GlobalOpt/deadglobal-diarglist-use.ll
32–33

Thanks, I'll fix this when landing this.

This revision was landed with ongoing or failed builds.May 28 2021, 8:20 AM
This revision was automatically updated to reflect the committed changes.