This is an archive of the discontinued LLVM Phabricator instance.

[RISCV] Remove MCRegisterInfo dependency from compressInst/uncompressInst/isCompressibleInst.
ClosedPublic

Authored by craig.topper on Jan 17 2023, 10:15 AM.

Details

Summary

This was being used to lookup the register class for a register number,
but those live in a tablegened array. We can index that array directly
just like RISCVAsmParser does.

Diff Detail

Event Timeline

craig.topper created this revision.Jan 17 2023, 10:15 AM
Herald added a project: Restricted Project. · View Herald TranscriptJan 17 2023, 10:15 AM
craig.topper requested review of this revision.Jan 17 2023, 10:15 AM
Herald added a project: Restricted Project. · View Herald TranscriptJan 17 2023, 10:15 AM
Herald added subscribers: eopXD, MaskRay. · View Herald Transcript
reames accepted this revision.Jan 17 2023, 11:54 AM

LGTM

This revision is now accepted and ready to land.Jan 17 2023, 11:54 AM
craig.topper retitled this revision from [RISCV] Remove MCRegisterInfo dependency from uncompresInst and isCompressibleInst. to [RISCV] Remove MCRegisterInfo dependency from compressInst/uncompressInst/isCompressibleInst..Jan 17 2023, 11:55 AM

I'm also going to remove the MCContext parameter from compressInst. I missed it the first time.

Remove MCContext from compressInst

This revision was landed with ongoing or failed builds.Jan 17 2023, 11:58 AM
This revision was automatically updated to reflect the committed changes.