This is an archive of the discontinued LLVM Phabricator instance.

[ARM] Add new target feature to fuse literal generation
ClosedPublic

Authored by evandro on Jul 19 2018, 1:02 PM.

Details

Summary

This feature enables the fusion of such operations on Cortex A57 and Cortex A72, as recommended in their Software Optimisation Guides, sections 4.14 and 4.11, respectively.

Diff Detail

Repository
rL LLVM

Event Timeline

evandro created this revision.Jul 19 2018, 1:02 PM

Hi Evandro, looks great, short and simple!

Shouldn't you also add the option to the CPUs description?

Shouldn't you also add the option to the CPUs description?

I shall, at least for Exynos, but I'd like to hear from our friends at ARM too.

I shall, at least for Exynos, but I'd like to hear from our friends at ARM too.

Makes sense. Adding a few more people, then.

@fhahn, if I remember correctly, you've worked on similar things not that long ago. Can you have a look?

fhahn accepted this revision.Jul 27 2018, 10:05 AM

LGTM, this is in line with the Cortex-A57 and Cortex-A72 opt guides. We have a similar feature for AArch64 already.

llvm/lib/Target/ARM/ARM.td
145 ↗(On Diff #156345)

FeatureFuseLiterals should be added to the cortex-a57 and cortex-a72 features according to the optimization guides. Can you also add a run lines with those CPUs to the test?

This revision is now accepted and ready to land.Jul 27 2018, 10:05 AM
evandro added inline comments.Jul 27 2018, 10:09 AM
llvm/lib/Target/ARM/ARM.td
145 ↗(On Diff #156345)

It's more complicated than that. I had to enable FeatureUseMISched as well for this to be effective. This is fine for Exynos, but it'd require more extensive testing on Cortex.

fhahn added inline comments.Jul 27 2018, 10:10 AM
llvm/lib/Target/ARM/ARM.td
145 ↗(On Diff #156345)

Ah right! No worries then

evandro added inline comments.Jul 27 2018, 10:10 AM
llvm/lib/Target/ARM/ARM.td
145 ↗(On Diff #156345)

Of course, Exynos needs this feature because there's no pipeline model for it in the ARM target.

This revision was automatically updated to reflect the committed changes.