This is an archive of the discontinued LLVM Phabricator instance.

[MachineLICM] Use newer model of register pressure sets.
ClosedPublic

Authored by djasper on Apr 11 2015, 3:38 AM.

Details

Reviewers
qcolombet
Summary

TargetRegisterInfo::getRegPressureLimit has a note that it is an old model that relies on manually entered classes. Using the newer model of register pressure sets seems more appropriate. We might eventually even switch to lib/CodeGen/RegisterPressure.cpp, but we should probably do incremental changes here.

Using the newer model also makes it easier to take regmasks into account which is necessary to fix llvm.org/PR23143. I am currently also preparing a patch for that, but would like to do this switch independently.

Diff Detail

Event Timeline

djasper updated this revision to Diff 23639.Apr 11 2015, 3:38 AM
djasper retitled this revision from to [MachineLICM] Use newer model of register pressure sets..
djasper updated this object.
djasper edited the test plan for this revision. (Show Details)
djasper added a reviewer: qcolombet.
djasper added a subscriber: Unknown Object (MLST).
djasper updated this revision to Diff 23655.Apr 12 2015, 10:03 AM

Fix typo and exit early.

qcolombet accepted this revision.Apr 13 2015, 1:12 PM
qcolombet edited edge metadata.

Hi Daniel,

Looks good to me with a couple a nitpicks. See my inline comments.

Basically, the comments and variables names should be updated to reflect that we use the RegPressureSet and not the register class anymore for the base identifier.

Thanks,
-Quentin

lib/CodeGen/MachineLICM.cpp
105

Update the comment to reflect that we now map the regPressureSet.

358

Change the name of the variable to NumRPS or something.
Right now, this is confusing.

1106

Change the name to RPIdAndCost or something along those lines.

1137

Ditto.

This revision is now accepted and ready to land.Apr 13 2015, 1:12 PM
djasper closed this revision.Apr 14 2015, 4:59 AM

Addressed comments and submitted as r234880.