This is an archive of the discontinued LLVM Phabricator instance.

CodeGen: Make computeRegisterLiveness search forward first
ClosedPublic

Authored by arsenm on Aug 28 2018, 4:56 AM.

Details

Reviewers
MatzeB
Summary

If there is an unused def, this would previously
report that the register was live. Check for uses
first so that it is reported as dead if never used.

Diff Detail

Event Timeline

arsenm created this revision.Aug 28 2018, 4:56 AM
MatzeB accepted this revision.Aug 29 2018, 10:34 AM

This change LGTM and should be committed.

Though reading the code I think there is a pre-existing bug hiding: The live-outs for return blocks is not the union of the successor live-ins but the callee saved registers (see for example the code in LivePhysRegs/LiveRegUnits dealing with this)...

This revision is now accepted and ready to land.Aug 29 2018, 10:34 AM
arsenm closed this revision.Aug 30 2018, 12:20 AM

r341027