This is an archive of the discontinued LLVM Phabricator instance.

[RISCV] Remove traces of Glue from RISCVISD::SELECT_CC
ClosedPublic

Authored by craig.topper on Nov 10 2020, 12:00 PM.

Details

Summary

We were creating RISCVISD::SELECT_CC nodes with Glue output that was never being used, and the tablegen SDNode had the SDNPInGlue flag instead of the SDNPOutGlue flag.

Since we don't seem to need the Glue just get rid of it from both places.

Diff Detail

Event Timeline

craig.topper created this revision.Nov 10 2020, 12:00 PM
craig.topper requested review of this revision.Nov 10 2020, 12:00 PM
frasercrmck accepted this revision.Nov 11 2020, 1:36 AM

LGTM; from a quick look I can't see anything that would need that glue. Do you have an idea why it was added?

This revision is now accepted and ready to land.Nov 11 2020, 1:36 AM

LGTM; from a quick look I can't see anything that would need that glue. Do you have an idea why it was added?

No. As far as I could tell it had been there but not used since the first patch that added RISCVISD::SELECT_CC.

asb added a comment.Nov 12 2020, 5:45 AM

LGTM; from a quick look I can't see anything that would need that glue. Do you have an idea why it was added?

No. As far as I could tell it had been there but not used since the first patch that added RISCVISD::SELECT_CC.

I think I'd just copied it across from the equivalent nodes in the Sparc (SPselecticc, SPselectxcc, SPselectfcc) and MSP430 (MSP540selectcc) backends. If it's not required it looks like a similar cleanup could be made there.

In D91199#2391113, @asb wrote:

LGTM; from a quick look I can't see anything that would need that glue. Do you have an idea why it was added?

No. As far as I could tell it had been there but not used since the first patch that added RISCVISD::SELECT_CC.

I think I'd just copied it across from the equivalent nodes in the Sparc (SPselecticc, SPselectxcc, SPselectfcc) and MSP430 (MSP540selectcc) backends. If it's not required it looks like a similar cleanup could be made there.

It looks like both Sparc and MSP430 do use a Glue input so the td file is correct for them. Sparc does not have a Glue output. MSP430 has an unused Glue output that could be cleaned up.