This is an archive of the discontinued LLVM Phabricator instance.

[RISCV] Share tablegen classes for F, D, and Zfh. Other simplifications. NFC
ClosedPublic

Authored by craig.topper on Dec 9 2021, 2:02 PM.

Details

Summary

By adding the register class and funct as template parameters we
can share the classes with all 3 extensions.

I've used "let SchedRW =" to avoid repeating scheduler classes on
multiple lines where we previously inherited from the Sched class.

A subsequent patch will add mayRaiseFPException and FRM dependencies.
Reducing the number of classes means less repeating for those changes.

This of course conflicts with the Zfinx patch D93298.

Diff Detail

Event Timeline

craig.topper created this revision.Dec 9 2021, 2:02 PM
craig.topper requested review of this revision.Dec 9 2021, 2:02 PM
Herald added a project: Restricted Project. · View Herald TranscriptDec 9 2021, 2:02 PM
Herald added a subscriber: MaskRay. · View Herald Transcript
craig.topper retitled this revision from [RISCV] Share tablegen classes for F, D, and Zfh. Other simplifications. to [RISCV] Share tablegen classes for F, D, and Zfh. Other simplifications. NFC.
craig.topper edited the summary of this revision. (Show Details)

LGTM. And this patch will improve D93298 a lot. Thanks!

llvm/lib/Target/RISCV/RISCVInstrInfoD.td
61–72

How about put Alias together?

This revision is now accepted and ready to land.Dec 9 2021, 5:51 PM
asb added a comment.Dec 13 2021, 7:48 AM

I'm late to the party on this one, just wanted to say this is much cleaner. Thanks!