This is an archive of the discontinued LLVM Phabricator instance.

[RegAllocGreedy]: Allow recoloring of done register if it's non-tied
ClosedPublic

Authored by uabelho on Sep 27 2017, 2:28 AM.

Details

Summary

If we have a non-allocated register, we allow us to try recoloring of an
already allocated and "Done" register, even if they are of the same
register class, if the non-allocated register has at least one tied def
and the allocated one has none.

It should be easier to recolor the non-tied register than the tied one, so
it might be an improvement even if they use the same regclasses.

Diff Detail

Repository
rL LLVM

Event Timeline

uabelho created this revision.Sep 27 2017, 2:28 AM

I found this problem on my out-of-tree target and the only reproducer I
have for it there is quite big and ugly so I've failed to make a nice
testcase out of it for an in-tree target.

I've run the benchmarks with

lnt runtest nt

on my x86 linux machine and computed checksums on the object files
and there is no difference with/without the patch.

qcolombet accepted this revision.Sep 27 2017, 1:48 PM

Looks sensible to me.

This revision is now accepted and ready to land.Sep 27 2017, 1:48 PM
uabelho updated this revision to Diff 116927.Sep 28 2017, 1:11 AM

Rebased to top of tree.

This revision was automatically updated to reflect the committed changes.