This is an archive of the discontinued LLVM Phabricator instance.

[DebugInfo] Consider debug label scope has an extra lexical block file
ClosedPublic

Authored by twoh on Aug 13 2019, 4:29 PM.

Details

Summary

There are places where a case that debug label scope has an extra lexical block file is not considered properly. The modified test won't pass without this patch.

Diff Detail

Repository
rL LLVM

Event Timeline

twoh created this revision.Aug 13 2019, 4:29 PM
Herald added a project: Restricted Project. · View Herald TranscriptAug 13 2019, 4:29 PM
Herald added a subscriber: hiraditya. · View Herald Transcript
dblaikie added a subscriber: dblaikie.

Might be helpful to have (at least for the review, doesn't necessarily need to be formalized into a lit test and checked in) a minimal source reproduction so we can more readily see what's happening here?

twoh added a comment.Aug 13 2019, 6:16 PM

@dblaikie Thank you for the comment. I encountered this problem while manipulating LLVM IR, and not sure how realistic the code can be if I synthesize one to reproduce this problem. Still, I think this is worth fixing unless we can guarantee that debug label scope won't have a DILexicalBlockFile.

aprantl accepted this revision.Aug 14 2019, 10:46 AM

Seems reasonable to me.

This revision is now accepted and ready to land.Aug 14 2019, 10:46 AM

(I'm approaching this from the point of "if the verifier accepts the IR, the backend has to deal with it", but David is right in pointing out that there may be a bug further up the pipeline and that perhaps it should be fixed and made illegal in IR.)

This revision was automatically updated to reflect the committed changes.