This is an archive of the discontinued LLVM Phabricator instance.

[InstrProf][correlation] Read DWARFv5 `OP_addrx` location
ClosedPublic

Authored by ellis on Jan 24 2022, 8:13 PM.

Details

Summary

Correctly read OP_addrx type encodings for DWARFv5 locations.

Diff Detail

Event Timeline

ellis created this revision.Jan 24 2022, 8:13 PM
ellis requested review of this revision.Jan 24 2022, 8:13 PM
Herald added a project: Restricted Project. · View Herald TranscriptJan 24 2022, 8:13 PM
dblaikie added inline comments.Jan 24 2022, 8:18 PM
llvm/lib/ProfileData/InstrProfCorrelator.cpp
130–133

This should probably be committed separately & ideally with a test case.

178–184

Could you use DWARFUnit::getAddrOffsetSectionItem, perhaps?

(& I guess this would be committed along with an additional test case that covers DWARFv5 or swapping back the temporary change for the existing test case (probably should keep some v4 coverage too, for the DW_OP_addr case above))

ellis updated this revision to Diff 402963.Jan 25 2022, 10:36 AM

Simplify code and add test

Herald added a project: Restricted Project. · View Herald TranscriptJan 25 2022, 10:36 AM
Herald added a subscriber: Restricted Project. · View Herald Transcript
ellis added inline comments.Jan 25 2022, 10:36 AM
llvm/lib/ProfileData/InstrProfCorrelator.cpp
178–184

Ah thanks, that makes the code much simpler!

ellis edited the summary of this revision. (Show Details)Jan 25 2022, 10:36 AM
dblaikie accepted this revision.Jan 25 2022, 10:48 AM

Looks good, thanks!

This revision is now accepted and ready to land.Jan 25 2022, 10:48 AM
This revision was landed with ongoing or failed builds.Jan 25 2022, 11:03 AM
This revision was automatically updated to reflect the committed changes.