This is an archive of the discontinued LLVM Phabricator instance.

RegisterCoalescer: Ignore interferences for constant physregs
ClosedPublic

Authored by MatzeB on Oct 28 2016, 5:09 PM.

Details

Summary

When copying to/from a constant register interferences can be ignored.

Also update the documentation for isConstantPhysReg() to make it more
obvious that this transformation is valid.

Diff Detail

Repository
rL LLVM

Event Timeline

MatzeB updated this revision to Diff 76277.Oct 28 2016, 5:09 PM
MatzeB retitled this revision from to RegisterCoalescer: Ignore interferences for constant physregs.
MatzeB updated this object.
MatzeB added reviewers: qcolombet, gberry.
MatzeB set the repository for this revision to rL LLVM.
MatzeB added a subscriber: llvm-commits.
gberry edited edge metadata.Oct 31 2016, 9:00 AM

This seems reasonable to me, but I'm not familiar enough with the details of this pass to confidently approve it, so you should probably wait for Quentin's approval.

qcolombet accepted this revision.Oct 31 2016, 5:05 PM
qcolombet edited edge metadata.

LGTM.

Nitpicks below.

include/llvm/CodeGen/MachineRegisterInfo.h
555 ↗(On Diff #76277)

Isn't that implied by "constant"?

test/CodeGen/AArch64/regcoal-constreg.mir
6 ↗(On Diff #76277)

Could you add a comment explaining what this function is testing?

This revision is now accepted and ready to land.Oct 31 2016, 5:05 PM
This revision was automatically updated to reflect the committed changes.