This is an archive of the discontinued LLVM Phabricator instance.

[CodeGen] Make TargetRegisterInfo::supportsBackwardScavenger return true by default
AbandonedPublic

Authored by foad on May 15 2023, 7:34 AM.

Details

Summary

But override it to return false for all targets that implement
requiresRegisterScavenging. This should make the change NFC for all
in-tree targets, and out-of-tree targets if they add a similar override.

This paves the way for adding backwards scavenging support on a
target-by-target basis. It is preferred over forwards scavenging because
it does not rely on accurate kill flags. When all targets are converted
we can remove the forwards scavenging implementation.

Diff Detail

Unit TestsFailed

Event Timeline

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

How difficult would it be for downstream targets to figure out the necessary change if they relied on the default false value?

foad planned changes to this revision.May 15 2023, 7:56 AM

I'm planning some tweaks in PEI which might mean that this patch touches fewer targets.

foad added a comment.May 15 2023, 7:57 AM

How difficult would it be for downstream targets to figure out the necessary change if they relied on the default false value?

That depends. If they have good lit test coverage then some tests will fail or crash.

foad abandoned this revision.Aug 7 2023, 6:06 AM

Superseded by D156983.