This is an archive of the discontinued LLVM Phabricator instance.

[SPIR-V] Simplify regclasses hierarchy and cleanup regbanks
Needs ReviewPublic

Authored by zuban32 on Jun 15 2023, 10:05 PM.

Details

Summary

The subset of SPIR-V instructions we have a dag pattern for
allows us to distinguish between integer and float versions
of instructions basing on existing constraints (different
GMIR opcodes for integer/FP versions of instructions + type inference),
so FP regclasses are redundant and can be removed.

And since SPIR-V is a virtual ISA it only needs a single regbank
to support instruction selection.

Depends on D153099 and D153100

Diff Detail

Event Timeline

zuban32 created this revision.Jun 15 2023, 10:05 PM
Herald added a project: Restricted Project. · View Herald TranscriptJun 15 2023, 10:05 PM
zuban32 requested review of this revision.Jun 15 2023, 10:05 PM
Herald added a project: Restricted Project. · View Herald Transcript

In general it looks fine. We also need to check testing results.

llvm/lib/Target/SPIRV/SPIRVInstrInfo.td
99

Should $set be i32imm, not ID? OpExtInstImport's result is still ID.