This is an archive of the discontinued LLVM Phabricator instance.

[SimplifyCFG] Preserve !annotation in FoldBranchToCommonDest.
ClosedPublic

Authored by fhahn on Dec 16 2020, 10:49 AM.

Details

Summary

When folding a branch to a common destination, preserve !annotation on
the created instruction, if the terminator of the BB that is going to be
removed has !annotation. This should ensure that !annotation is attached
to the instructions that 'replace' the original terminator.

Diff Detail

Event Timeline

fhahn created this revision.Dec 16 2020, 10:49 AM
fhahn requested review of this revision.Dec 16 2020, 10:49 AM
Herald added a project: Restricted Project. · View Herald TranscriptDec 16 2020, 10:49 AM
jdoerfert accepted this revision.Dec 16 2020, 6:43 PM

LGMT, assuming there is a CollectMetadataToCopy.

This revision is now accepted and ready to land.Dec 16 2020, 6:43 PM
lebedev.ri accepted this revision.Dec 16 2020, 11:44 PM

LG

llvm/lib/Transforms/Utils/SimplifyCFG.cpp
2950

I guess this is preexisting, but this is confusing, it really should be named dropUnknownNonDebugMetadataExcept()

This revision was landed with ongoing or failed builds.Dec 17 2020, 6:07 AM
This revision was automatically updated to reflect the committed changes.