This is an archive of the discontinued LLVM Phabricator instance.

[Sparc] Check register use with isPhysRegUsed() instead of reg_nodbg_empty()
ClosedPublic

Authored by dcederman on Nov 24 2016, 1:07 AM.

Details

Summary

By using reg_nodbg_empty() to determine if a function can be treated as a leaf function or not, we miss the case when the register pair L0_L1 is used but not L0 by itself. This has the effect that use_all_i32_regs(), a test in reserved-regs.ll which tries to use all registers, gets treated as a leaf function.

Diff Detail

Repository
rL LLVM

Event Timeline

dcederman updated this revision to Diff 79189.Nov 24 2016, 1:07 AM
dcederman retitled this revision from to [Sparc] Check register use with isPhysRegUsed() instead of reg_nodbg_empty().
dcederman updated this object.
dcederman added reviewers: jyknight, venkatra.
dcederman added a subscriber: llvm-commits.

What about this fix? Will it be committed?
The test reserved-regs.ll is one of two remaining fails that are observed if expensive checks are enabled (https://llvm.org/bugs/show_bug.cgi?id=30999)
With this fix the test passes.

RKSimon added a subscriber: RKSimon.Feb 8 2017, 6:04 AM

Hi Daniel,
Your patch fixes the last failing test when expensive checks are enabled. Do you plan to commit this fix?
Thanks.

Hi Serge,

I would like to have it committed, but have not gotten it approved by anyone yet. If you could click the accept revision button I can commit it tomorrow.

Venkatraman, James,
Do you think this patch can be accepted?

RKSimon added a subscriber: davide.Mar 7 2017, 2:20 PM
jyknight accepted this revision.Mar 8 2017, 6:57 AM

Sorry, yes, this looks good!

This revision is now accepted and ready to land.Mar 8 2017, 6:57 AM
This revision was automatically updated to reflect the committed changes.