This is an archive of the discontinued LLVM Phabricator instance.

[RISCV] Move getRVVMCOpcode to RISCVInstrInfo.h
AbandonedPublic

Authored by wangpc on Jun 9 2023, 3:14 AM.

Details

Summary

To simplify more code.

Diff Detail

Event Timeline

Herald added a project: Restricted Project. · View Herald TranscriptJun 9 2023, 3:14 AM
pcwang-thead requested review of this revision.Jun 9 2023, 3:14 AM
Herald added a project: Restricted Project. · View Herald TranscriptJun 9 2023, 3:14 AM
craig.topper added inline comments.Jun 9 2023, 8:29 AM
llvm/lib/Target/RISCV/RISCVInstrInfo.h
265

Can we change uint16_t to unsigned?

265

That would match what MachineInstr::getOpcode returns

One concern: is it possible to be false positive for these usages (though I haven't found any failed test)? When mapping pseudos to MC opcode, we may lost some information like MASK, TIED, TU/TA, etc.

llvm/lib/Target/RISCV/RISCVInstrInfo.cpp
2145

For example, we didn't catch _MASK here.

wangpc commandeered this revision.Jun 25 2023, 7:45 PM
wangpc added a reviewer: pcwang-thead.

Ping

One concern: is it possible to be false positive for these usages (though I haven't found any failed test)? When mapping pseudos to MC opcode, we may lost some information like MASK, TIED, TU/TA, etc.

I am concerned about that. The operand numbers are different between the different versions. And they have different properties.

wangpc planned changes to this revision.Jul 10 2023, 8:23 PM
wangpc abandoned this revision.Oct 30 2023, 2:04 AM