This is an archive of the discontinued LLVM Phabricator instance.

[DwarfDebug] Improve single location detection in validThroughout (2/4)
ClosedPublic

Authored by Orlando on Aug 18 2020, 10:12 AM.

Details

Summary

With this patch we're now accounting for two more cases which should be
considered 'valid throughout': First, where RangeEnd is ScopeEnd. Second, where
RangeEnd comes before ScopeEnd when including meta instructions, but are both
preceded by the same non-meta instruction.

CTMark shows a geomean binary size reduction of 1.5% for RelWithDebInfo builds.
llvm-locstats (using D85636) shows a very small variable location coverage
change in 2 of 10 binaries, but it is in the order of 10s of bytes which lines
up with my expectations.

I've added a test which checks both of these new cases. The first check in the
test isn't strictly necessary for this patch. But I'm not sure that it is
explicitly tested anywhere else, and is useful for the final patch in the
series.

Diff Detail

Event Timeline

Orlando created this revision.Aug 18 2020, 10:12 AM

Just a note: This patch moves the InstructionOrdering class added in D86150 out from DbgEntityHistoryCalculator.cpp to DbgEntityHistoryCalculator.h so that we're able to use it in DebugHandlerBase.

aprantl accepted this revision.Aug 20 2020, 8:30 AM
This revision is now accepted and ready to land.Aug 20 2020, 8:30 AM