This is an archive of the discontinued LLVM Phabricator instance.

[Lanai] Use backwards scavenging in frame index elimination
ClosedPublic

Authored by foad on May 15 2023, 11:27 AM.

Details

Summary

This is preferred because it does not rely on accurate kill flags.

Diff Detail

Event Timeline

foad created this revision.May 15 2023, 11:27 AM
Herald added a project: Restricted Project. · View Herald TranscriptMay 15 2023, 11:27 AM
foad requested review of this revision.May 15 2023, 11:27 AM
Herald added a project: Restricted Project. · View Herald TranscriptMay 15 2023, 11:27 AM

Would a difference show up on a small test?

jpienaar accepted this revision.May 15 2023, 7:00 PM

Looks good in general.

This revision is now accepted and ready to land.May 15 2023, 7:00 PM
foad added a comment.May 16 2023, 1:42 AM

Would a difference show up on a small test?

If you have a small test that relies on scavenging then we can run it with -stop-before=prologepilog to get a MIR test, and then manually add/remove some kill flags to show that forward scavenging is affected by that but backwards scavenging is not.

Currently if I disable the scavenging part of LanaiRegisterInfo::eliminateFrameIndex then all the codegen tests still pass :(

foad updated this revision to Diff 522650.May 16 2023, 8:58 AM

Switch to scavengeRegisterBackwards.

This revision was automatically updated to reflect the committed changes.