This is an archive of the discontinued LLVM Phabricator instance.

[RISCV] Move implementation of getVLOpNum and getSEWOpNum from RISCVInsertVSETVLI to RISCVBaseInfo.h. NFC
ClosedPublic

Authored by craig.topper on May 10 2022, 3:52 PM.

Details

Summary

We should consolidate the operand counting and ordering into
RISCVBaseInfo.h and stop spreading it around.

Diff Detail

Event Timeline

craig.topper created this revision.May 10 2022, 3:52 PM
Herald added a project: Restricted Project. · View Herald TranscriptMay 10 2022, 3:52 PM
craig.topper requested review of this revision.May 10 2022, 3:52 PM
Herald added a project: Restricted Project. · View Herald TranscriptMay 10 2022, 3:52 PM

100% agreed, thank you. FWIW I think there's scope to do something similar for our ISD nodes.

asb accepted this revision.May 11 2022, 5:31 AM

This refactoring looks like a good move to me.

This revision is now accepted and ready to land.May 11 2022, 5:31 AM

LGTM

Once this lands, there's one place in operand printing which can probably use the SEW version to simplify some code. I'd planned on doing this myself, just got focused on something else and hadn't gotten to this yet.

This revision was landed with ongoing or failed builds.May 11 2022, 11:20 AM
This revision was automatically updated to reflect the committed changes.