This is an archive of the discontinued LLVM Phabricator instance.

[DebugInfo][InstrRef] Recover some performance from tracking stack-slot sublocations
ClosedPublic

Authored by jmorse on Oct 22 2021, 9:16 AM.

Details

Summary

This patch is like D111627 -- instead of calculating IDF for every location on the stack, only do it for the smallest units of interference, and copy the PHIs for those units to any aliases.

This saves us a cool 0.5% instructions on CTMark, thanks again to the compile-time-tracker project.

The test added runs placeMLocPHIs directly, and tests that:

  • A def of the lower 8 bits of a stack slot causes all aliasing regs to have PHIs placed,
  • It doesn't cause the equivalent location to x86's $ah, which isn't aliased, to have a PHI placed.

Diff Detail

Event Timeline

jmorse created this revision.Oct 22 2021, 9:16 AM
jmorse requested review of this revision.Oct 22 2021, 9:16 AM
Herald added a project: Restricted Project. · View Herald TranscriptOct 22 2021, 9:16 AM
Orlando accepted this revision.Oct 25 2021, 7:06 AM

LGTM

llvm/unittests/CodeGen/InstrRefLDVTest.cpp
1100

What are the 10 locs? (plus nit: comment needs capital and full stop)

1148

nit: don't -> doesn't

This revision is now accepted and ready to land.Oct 25 2021, 7:06 AM
This revision was landed with ongoing or failed builds.Oct 25 2021, 9:31 AM
This revision was automatically updated to reflect the committed changes.