This is an archive of the discontinued LLVM Phabricator instance.

[CodeExtractor] Preserve entire scope of !DIVariables when moving them
AbandonedPublic

Authored by fdeazeve on Dec 8 2022, 12:11 PM.

Details

Reviewers
aprantl
Summary

When a dbg.value is moved into a new function, the corresponding
variable should have its entire scope chain reparented with the new
function. The current implementation drops the scope chain and replaces
it with a subprogram for the new function.

Diff Detail

Event Timeline

fdeazeve created this revision.Dec 8 2022, 12:11 PM
Herald added a project: Restricted Project. · View Herald TranscriptDec 8 2022, 12:11 PM
Herald added a subscriber: hiraditya. · View Herald Transcript
fdeazeve requested review of this revision.Dec 8 2022, 12:11 PM
Herald added a project: Restricted Project. · View Herald TranscriptDec 8 2022, 12:11 PM

Err, ignore this. I meant to create a series of patches

fdeazeve updated this revision to Diff 481399.Dec 8 2022, 12:14 PM

Trying to create a sequence of patches

aprantl accepted this revision.Dec 8 2022, 12:32 PM
aprantl added inline comments.
llvm/include/llvm/IR/DebugInfoMetadata.h
1588 ↗(On Diff #481399)

Might want to add a unit test for this.

This revision is now accepted and ready to land.Dec 8 2022, 12:32 PM
fdeazeve updated this revision to Diff 481410.Dec 8 2022, 12:42 PM

Remove other commits

fdeazeve abandoned this revision.Dec 8 2022, 12:44 PM

I'll resubmit this properly.

aprantl added inline comments.Dec 8 2022, 2:58 PM
llvm/lib/Transforms/Utils/CodeExtractor.cpp
1594

if (!)