This is an archive of the discontinued LLVM Phabricator instance.

[DwarfDebug] Improve multi-BB single location detection in validThroughout (3/4)
ClosedPublic

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

Details

Summary

With the changes introduced in D86151 we can now easily check for single locations
which span multiple blocks for inlined scopes and blocks.

CTMark shows a geomean binary size reduction of 2.2% for RelWithDebInfo builds.
llvm-locstats (using D85636) shows a very small variable location coverage
change in 5 of 10 binaries, but just like in D86151 it is only in the order of
10s of bytes.

Diff Detail

Event Timeline

Orlando created this revision.Aug 18 2020, 10:15 AM
djtodoro added inline comments.Aug 24 2020, 2:25 AM
llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
1569

What does this change specially perform with multi BBs?

llvm/test/DebugInfo/X86/location-range-inlined-xblock.mir
67

unused, please remove this

97

I guess we don't need tbaa metadata for this test case.

Orlando updated this revision to Diff 287594.Aug 25 2020, 1:53 AM
Orlando marked 3 inline comments as done.

A small update to address comments from @djtodoro.

Orlando added inline comments.Aug 25 2020, 1:55 AM
llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
1569

This line specifically has just moved down from line 1544.

More generally, the previous patch in the series (D86151) introduced the const InstructionOrdering &Ordering parameter and used it on line 1590, replacing a scan through MBB instructions. The functionality to compare instruction positions across blocks was add there, and this patch just removes the exit checks that were previously (but no longer) required.

@djtodoro do you have any more thoughts on this patch? Copying part of my inline comment here for any other reviewers:

The previous patch in the series (D86151) introduced the const InstructionOrdering &Ordering parameter and used it on line 1590, replacing a scan through MBB instructions. The functionality to compare instruction positions across blocks was add there, and this patch just removes the exit checks that were previously (but no longer) required.

djtodoro accepted this revision.Aug 26 2020, 11:56 PM

LGTM, thanks.

This revision is now accepted and ready to land.Aug 26 2020, 11:56 PM

Thanks!

Before landing I removed the XFAIL:* from llvm/test/DebugInfo/AArch64/inlined-argument.ll because it passes with this patch.