Page MenuHomePhabricator

[ARM] add target arch definitions for 8.1-M and MVE.
Needs ReviewPublic

Authored by simon_tatham on Apr 15 2019, 5:57 AM.

Details

Summary

This adds:

  • LLVM subtarget features to make all the new instructions conditional on
  • CPU and FPU names for use on armclang's command line, with default FPUs set so that "armv8.1-m.main+fp" and "armv8.1-m.main+fp.dp" will select the right FPU features
  • architecture extension names "mve" and "mve.fp"
  • ABI build attribute support for v8.1-M (a new value for Tag_CPU_arch) and MVE (a new actual tag)

Event Timeline

simon_tatham created this revision.Apr 15 2019, 5:57 AM

Could probably also do with some testing in unittests/Support/ARMAttributeParser.cpp and TargetParserTest.cpp.

This adds:

  • LLVM subtarget features to make all the new instructions conditional on
  • CPU and FPU names for use on armclang's command line, with default FPUs set so that "armv8.1-m.main+fp" and "armv8.1-m.main+fp.dp" will select the right FPU features
  • architecture extension names "mve" and "mve.fp"
  • ABI build attribute support for v8.1-M (a new value for Tag_CPU_arch) and MVE (a new actual tag)

Looks like they could be separate commits. But if that makes things too complicated now, I think we can deal with this initial plumbing work.

llvm/include/llvm/Support/ARMTargetParser.h
48

I think we need to regression test this new extension in unittests/Support/TargetParserTest.cpp too.

llvm/lib/Support/ARMAttributeParser.cpp
137

what are these nullptrs, and how many do we need? :-)
More seriously, I haven't looked into this bit before, but at least a comment would be good here I guess.

ostannard added inline comments.
llvm/lib/Support/ARMAttributeParser.cpp
137

The nullptrs are missing strings for "Arm v8-R", "Arm v8.1-A", "Arm v8.2-A" and "Arm v8.3-A", we should add these, but probably as a separate patch.

llvm/lib/Target/ARM/ARMSubtarget.h
114

Nit: can we add a trailing comma to tidy up the next diff?