This is an archive of the discontinued LLVM Phabricator instance.

[ARM] Add big.LITTLE mcpu tuning options
Needs ReviewPublic

Authored by kongyi on Apr 14 2017, 12:17 AM.

Details

Summary

This is similar to implementations of other compilers. For now,
big.LITTLE configurations are treated as the little core, since code
optimized for big core would run poorly on the little cores.

[Aarch64] Add big.LITTLE mcpu tuning options

This is similar to implementations of other compilers. For now,
big.LITTLE configurations are treated as the little core, since code
optimized for big core would run poorly on the little cores.

Event Timeline

kongyi created this revision.Apr 14 2017, 12:17 AM

arc merged these two changes together... Will commit them separately for ARM and Aarch64.

srhines added inline comments.Apr 14 2017, 2:28 AM
lib/Target/ARM/ARM.td
819

Why is FeatureFPAO dropped here? In most of the other entries, you use the same features as cortex-a53, yet here you are only keeping features that both cores have.

832

Same question about FeatureFPAO?

test/CodeGen/ARM/cpus.ll
18

This is at least missing Krait, although I am not sure if you meant to be exhaustive here.

kongyi updated this revision to Diff 95325.Apr 14 2017, 11:22 AM

Added FeatureFPAO

kongyi added inline comments.Apr 14 2017, 11:24 AM
lib/Target/ARM/ARM.td
819

Originally thought this is an architectural extension. Done.

test/CodeGen/ARM/cpus.ll
18

Too many to be exhaustive, just picked some special cases: cortex-*, cortex-*.cortex-*, non-cortex.

kristof.beyls edited edge metadata.Apr 21 2017, 9:43 AM

Adding big.LITTLE mcpu options for clang to be more command-line compatible with gcc is a good idea.
Mapping the code generation for it to what is done for the little core also is a defendable position.
I'm just wondering if in some of the implementation of this there could be less copy-paste? I've made a few specific comments in some places of the code where ideally there should be less copy-paste.

include/llvm/Support/AArch64TargetParser.def
61

could copy-paste be avoid here at all?

include/llvm/Support/ARMTargetParser.def
245

Not sure if copy paste is avoidable here?

lib/Target/AArch64/AArch64.td
214–226

Would it be possible to have less copy-pasted code here by somehow refer to what is specified for Cortex-A53?

lib/Target/ARM/ARM.td
828–833

Would there be any way to not copy what is specified for Cortex-A53 here, but somehow refer to the A53's specifications?

Not to gravedig this but has there been any progress on this? Ran into this issue when running the same command on gcc and clang.

Herald added a project: Restricted Project. · View Herald TranscriptMar 5 2022, 11:56 AM