This is an archive of the discontinued LLVM Phabricator instance.

{DebugInfo][LoopStrengthReduction] Don't cache dbg.value that are already undef
ClosedPublic

Authored by chrisjackson on Aug 4 2021, 5:05 AM.

Details

Summary

The SCEV-based salvaging method caches dbg.value information pre-LSR so that salvaging may be attempted on those dbg.value if necessary post-LSR. If the dbg.value are already undef pre-LSR then a salvage attempt would be fruitless, so avoid caching them.

Diff Detail

Event Timeline

chrisjackson created this revision.Aug 4 2021, 5:05 AM
chrisjackson requested review of this revision.Aug 4 2021, 5:05 AM
Herald added a project: Restricted Project. · View Herald TranscriptAug 4 2021, 5:05 AM

Applied clang-format.

Sensible; unfortunately, it probably needs a test - including an extra undef dbg.value in the test on the previous patch will probably do.

Sensible; unfortunately, it probably needs a test - including an extra undef dbg.value in the test on the previous patch will probably do.

I will add an undef dbg.value as you suggest as a form of regression test.

Add updated test that is shared with D107438.

Correct test file format.

This revision is now accepted and ready to land.Aug 5 2021, 3:27 AM
This revision was landed with ongoing or failed builds.Aug 5 2021, 11:17 AM
This revision was automatically updated to reflect the committed changes.