This is an archive of the discontinued LLVM Phabricator instance.

[Debugify] Optimize debugify original mode
ClosedPublic

Authored by djtodoro on Dec 13 2021, 3:38 AM.

Details

Summary

Before we start addressing the issue with having a lot of false positives when using debugify in the original mode, we have made a few patches that should speed up the execution of the testing utility Passes.

For example, when testing a large project (let's say LLVM project itself), we can face a lot of potential DI issues. Usually, we use -verify-each-debuginfo-preserve (that is very similar to -debugify-each) -- it collects DI metadata before each Pass, and after the Pass it checks if the Pass preserved the DI metadata. However, we can speed up this process, since we don't need to collect DI metadata before each pass -- we could use the DI metadata that are collected after the previous Pass from the pipeline as an input for the next Pass.

This patch speeds up the utility for ~2x.

Diff Detail

Event Timeline

djtodoro created this revision.Dec 13 2021, 3:38 AM
djtodoro requested review of this revision.Dec 13 2021, 3:38 AM
Herald added a project: Restricted Project. · View Herald TranscriptDec 13 2021, 3:38 AM
StephenTozer accepted this revision.Dec 15 2021, 4:38 AM

Seems like a simple and sensible change.

This revision is now accepted and ready to land.Dec 15 2021, 4:38 AM
djtodoro updated this revision to Diff 416438.Mar 18 2022, 3:17 AM
  • Move the skipping into the for-loop since we want to collect metadata for the functions that are not observed in the previous Pass (for example the function wasn't of interest due to having an attribute attached that wasn't relevant for the previous Pass) -- the improvement is still ~2x

Again, Sorry for delay here and, @Orlando @StephenTozer thank you a lot for your comments!

Herald added a project: Restricted Project. · View Herald TranscriptMar 18 2022, 3:17 AM
StephenTozer accepted this revision.Mar 21 2022, 8:10 AM

Latest change makes sense, LGTM

This revision was landed with ongoing or failed builds.Mar 22 2022, 4:14 AM
This revision was automatically updated to reflect the committed changes.