This is an archive of the discontinued LLVM Phabricator instance.

[ARM] Add new feature to enable optimizing the VFP registers
ClosedPublic

Authored by evandro on Jul 17 2018, 5:54 PM.

Details

Summary

Enable the optimization of operations on DPR and SPR via a feature instead of checking the target.

Diff Detail

Event Timeline

evandro created this revision.Jul 17 2018, 5:54 PM

If this is no longer only used by Cortex-A15, I think the regression tests need to be updated to use the new feature instead of the passing the cpu.

Otherwise, I have no objections to turning this on for other cores if that's beneficial.

llvm/lib/Target/ARM/ARM.td
200

I think the description/name is somewhat confusing.

This enables using vdup instructions to move from the vfp execution domain to neon, which on some cores (at least Cortex-A15) is faster.

evandro updated this revision to Diff 156074.Jul 18 2018, 8:09 AM

Update the test case to use the feature attribute.

llvm/lib/Target/ARM/ARM.td
200

What do you suggest?

evandro updated this revision to Diff 156076.Jul 18 2018, 8:14 AM
sbaranga added inline comments.Jul 18 2018, 8:43 AM
llvm/lib/Target/ARM/ARM.td
200

Something like FeatureUseVDUPForFPToNEON? Ideally something shorter, but that's the best that I can come up with at the moment.

The comment should say something along the lines that it's profitable for the target to use a VDUP instruction when performing a transition from the VFP to NEON execution domain.

evandro added inline comments.Jul 18 2018, 10:19 AM
llvm/lib/Target/ARM/ARM.td
200

How about FeatureSplatVFPToNeon?

sbaranga added inline comments.Jul 18 2018, 10:59 PM
llvm/lib/Target/ARM/ARM.td
200

Yes, that works as well.

evandro marked 5 inline comments as done.Jul 19 2018, 9:15 AM
evandro updated this revision to Diff 156293.Jul 19 2018, 9:26 AM
evandro retitled this revision from [ARM] Add new feature to enable optimizing the VFD registers to [ARM] Add new feature to enable optimizing the VFP registers.
This revision is now accepted and ready to land.Jul 19 2018, 11:58 PM
This revision was automatically updated to reflect the committed changes.