This is an archive of the discontinued LLVM Phabricator instance.

[ARM] Move MVEOpcodes helpers to ARMBaseInstrInfo. NFC.
ClosedPublic

Authored by SjoerdMeijer on Dec 12 2019, 9:29 AM.

Details

Reviewers
samparker
dmgreen
Summary

In files ARMLowOverheadLoops.cpp, MVETailPredication.cpp, and MVEVPTBlock.cpp we have quite a few helper functions all looking at the opcodes of MVE instructions. This moves all these utility functions to Utils/MVEOpcodes.cpp and namespace MVEOpcodes so that all these functions all clustered and we don't clutter the passes with them.

Diff Detail

Event Timeline

SjoerdMeijer created this revision.Dec 12 2019, 9:29 AM
Herald added a project: Restricted Project. · View Herald TranscriptDec 12 2019, 9:29 AM
SjoerdMeijer retitled this revision from [ARM] Create utility MVEOpcodes to [ARM] Utility functions MVEOpcodes. NFC..Dec 12 2019, 9:31 AM

Do we need a cpp file..? Would be nice for these helpers to get inlined. Yaybe worth them living in ARMBaseInstrInfo.h as there's already a VPT opcode helper there too.

llvm/lib/Target/ARM/Utils/MVEOpcodes.cpp
17 ↗(On Diff #233644)

This is only really ever going to be used in one place so I'd prefer it stay there really.

115 ↗(On Diff #233644)

These aren't MVE instructions.

SjoerdMeijer retitled this revision from [ARM] Utility functions MVEOpcodes. NFC. to [ARM] Move MVEOpcodes helpers to ARMBaseInstrInfo. NFC..

Ah yes, thanks, I forgot about ARMBaseInstrInfo, but that's definitely the place where this should live.

samparker accepted this revision.Dec 13 2019, 6:48 AM

Cheers, LGTM

This revision is now accepted and ready to land.Dec 13 2019, 6:48 AM
SjoerdMeijer closed this revision.Dec 16 2019, 1:50 AM

Committed in 049f9672d8566f0d0a115f11e2a53018ea502b10
(I had a typo in the tag Diferential Revision, so this didn't get closed automatically)