This is an archive of the discontinued LLVM Phabricator instance.

[AArch64][AsmParser] Make parse function for VectorLists generic to other vector types.
ClosedPublic

Authored by sdesmalen on Apr 9 2018, 2:34 AM.

Details

Summary

Added 'RegisterKind' to the VectorListOp structure, so that this operand
type can be reused for SVE vector lists in a later patch. It also
refactors the 'tryParseVectorList' function so it can be used directly
in the ParserMethod of an operand. The parsing can now parse multiple
kinds of vectors and recover if there is no match.

This is patch [3/6] in a series to add assembler/disassembler support for
SVE's contiguous ST1 (scalar+imm) instructions.

Diff Detail

Event Timeline

sdesmalen created this revision.Apr 9 2018, 2:34 AM
sdesmalen updated this revision to Diff 141807.Apr 10 2018, 1:48 AM

Rebased to reflect changes in dependent patch D45427 .

rengolin accepted this revision.Apr 11 2018, 6:19 AM

Mechanical update, looks good, thanks!

lib/Target/AArch64/AArch64RegisterInfo.td
497

I get it, this will *only* work for Neon vectors because eltsize is fixed.

This revision is now accepted and ready to land.Apr 11 2018, 6:19 AM
sdesmalen added inline comments.Apr 12 2018, 4:08 AM
lib/Target/AArch64/AArch64RegisterInfo.td
497

I guess you mean 'vectorKind' (e.g. RegKind::NeonVector)?
'eltsize' is different for the different suffixes (b, h, s, d).

rengolin added inline comments.Apr 12 2018, 4:26 AM
lib/Target/AArch64/AArch64RegisterInfo.td
497

Yup

This revision was automatically updated to reflect the committed changes.