This is an archive of the discontinued LLVM Phabricator instance.

[StandardInstrumentations] Assign names to basic blocks without names
ClosedPublic

Authored by aeubanks on Jul 26 2022, 10:27 AM.

Details

Summary

Fixes code in OrderedChangedData<T>::report which assumes that a string will only appear once in Before/After.

Diff Detail

Event Timeline

aeubanks created this revision.Jul 26 2022, 10:27 AM
Herald added a project: Restricted Project. · View Herald TranscriptJul 26 2022, 10:27 AM
Herald added a subscriber: hiraditya. · View Herald Transcript
aeubanks requested review of this revision.Jul 26 2022, 10:27 AM
Herald added a project: Restricted Project. · View Herald TranscriptJul 26 2022, 10:27 AM
jamieschmeiser accepted this revision.Jul 27 2022, 1:40 PM

LGTM.

I'm wondering what would happen (after this change) if a function were to re-order the blocks (without any other change). EG, the first 2 blocks in the function are swapped in the function list of blocks with no other change. I suspect that this would then indicate that the change was the original block 1 was replaced with the new block 2 and the original block 2 was replaced with the new block 1 with the corresponding changes to the branches. I think that may be unavoidable since the comparisons are string based. Besides, it is better than crashing...

Thanks for fixing this.

This revision is now accepted and ready to land.Jul 27 2022, 1:40 PM
This revision was landed with ongoing or failed builds.Aug 2 2022, 11:06 AM
This revision was automatically updated to reflect the committed changes.