This is an archive of the discontinued LLVM Phabricator instance.

[DwarfDebug] Improve validThroughout performance (4/4)
ClosedPublic

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

Details

Summary

Almost NFC (see end).

The backwards scan in validThroughout significantly contributed to compile time
for a pathological case, causing the 'X86 Assembly Printer' pass to account for
roughly 70% of the run time. This patch guards the loop against running
unnecessarily for a common case, bringing the pass contribution down to 4%.

Almost NFC:
There is a hack in validThroughout which promotes single constant value
DBG_VALUEs in the prologue to be live throughout the function. We're more
likely to hit this code path with this patch applied. Similarly to the parent patches
there is a small coverage change reported in the order of 10s of bytes.

Diff Detail

Event Timeline

Orlando created this revision.Aug 18 2020, 10:17 AM
aprantl accepted this revision.Aug 18 2020, 1:47 PM
This revision is now accepted and ready to land.Aug 18 2020, 1:47 PM

Thank you @aprantl.

I think we can (should?) remove the cut-off added in D83236 when this lands - I was testing against the same pathological case when writing this patch. Is there any kind of approval process for that?

Thank you @aprantl.

I think we can (should?) remove the cut-off added in D83236 when this lands - I was testing against the same pathological case when writing this patch. Is there any kind of approval process for that?

Sounds good! @vsk?