This is an archive of the discontinued LLVM Phabricator instance.

[Sparc] Mark the g0 register as constant
AbandonedPublic

Authored by arichardson on Aug 24 2022, 7:29 AM.

Details

Summary

This adds an implementation of isConstantPhysReg().

Diff Detail

Event Timeline

arichardson created this revision.Aug 24 2022, 7:29 AM
arichardson requested review of this revision.Aug 24 2022, 7:29 AM
Herald added a project: Restricted Project. · View Herald TranscriptAug 24 2022, 7:29 AM
arichardson retitled this revision from [Sparc] Mark the g0 register as constant This adds an implementation of isConstantPhysReg(). to [Sparc] Mark the g0 register as constantThis adds an implementation of isConstantPhysReg()..Aug 24 2022, 7:30 AM
arichardson edited the summary of this revision. (Show Details)
arichardson added a subscriber: Carrot.
arichardson retitled this revision from [Sparc] Mark the g0 register as constantThis adds an implementation of isConstantPhysReg(). to [Sparc] Mark the g0 register as constant.Aug 25 2022, 4:16 AM

Test would be nice

llvm/lib/Target/Sparc/SparcRegisterInfo.td
130

I think if you only want this to be G0, it's clearer to do:

def G0 ... {
  let isConstant = true
}
arsenm requested changes to this revision.Nov 18 2022, 3:43 PM
This revision now requires changes to proceed.Nov 18 2022, 3:43 PM
arichardson abandoned this revision.EditedNov 20 2022, 2:31 AM

I have zero interest and knowledge of sparc, so I'm not sure how to write a test.

I only opened this review because it was pointed out in the review that added isConstant to tablegen. Happy to let someone else pick this up.