This is an archive of the discontinued LLVM Phabricator instance.

MachineRegisterInfo: Add way to mark individual registers as used
AbandonedPublic

Authored by arsenm on Apr 11 2017, 12:48 PM.

Details

Reviewers
MatzeB
Summary

There is already a way to add phys reg uses from a regmask,
but not for a single register.

This will help avoid fragile special handling in AMDGPU
reserved register compaction code in the prolog handling.

Diff Detail

Event Timeline

arsenm created this revision.Apr 11 2017, 12:48 PM
MatzeB requested changes to this revision.Apr 12 2017, 12:45 PM

I think UsedPhysRegMask is supposed to be the union of all register mask operands in the function. It just functions as a cache there. Having a way to manually set/reset it seems wrong to me. What exactly do you want/need this for?

This revision now requires changes to proceed.Apr 12 2017, 12:45 PM
arsenm abandoned this revision.Apr 12 2017, 3:37 PM

I think UsedPhysRegMask is supposed to be the union of all register mask operands in the function. It just functions as a cache there. Having a way to manually set/reset it seems wrong to me. What exactly do you want/need this for?

The code before was replacing uses of reserved registers before the uses were added. I reordered things so I think that this isn't necessary anymore