This is an archive of the discontinued LLVM Phabricator instance.

Split RC::getSize into RC::getSpillSize and RC::getRegSize
AbandonedPublic

Authored by kparzysz on Aug 18 2016, 8:54 AM.

Details

Summary

The function getSize in MCRegisterClass and TargetRegisterClass actually refers to the size of the spill slot needed for registers from this class. This may or may not be equal to the actual size of the register, since the register's representation in memory may not be identical to the register itself.
Moreover, the comments in the MCRegisterInfo.h and TargetRegisterInfo.h explicitly state that the function getSize refers to both, the size of the register and the size of the spill slot.

This patch will provide two new member functions: getSpillSize and getRegSize in both MCRegisterClass and TargetRegisterClass, each returning only the value corresponding to the name. The existing function getSize will remain until all callers are updated to use one of the new functions.

Diff Detail

Repository
rL LLVM

Event Timeline

kparzysz updated this revision to Diff 68544.Aug 18 2016, 8:54 AM
kparzysz retitled this revision from to Split RC::getSize into RC::getSpillSize and RC::getRegSize.
kparzysz updated this object.
kparzysz added reviewers: arsenm, MatzeB.
kparzysz set the repository for this revision to rL LLVM.
kparzysz added a subscriber: llvm-commits.
kparzysz abandoned this revision.Oct 19 2016, 1:17 PM

This will be implemented in a different way.