Bug 235024 - [OPTIMISATION] compile ARM with -O2 ?
Summary: [OPTIMISATION] compile ARM with -O2 ?
Status: New
Alias: None
Product: Base System
Classification: Unclassified
Component: arm (show other bugs)
Version: CURRENT
Hardware: Any Any
: --- Affects Only Me
Assignee: freebsd-arm mailing list
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-01-17 13:59 UTC by Alexandre martins
Modified: 2019-01-18 14:37 UTC (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Alexandre martins 2019-01-17 13:59:37 UTC
Hi all !

There is an very old workaround in share/mk/sys.mk for ARM target:

https://svnweb.freebsd.org/base?view=revision&revision=173375

That workaround make us compile ARM in "-O" optimisation level instead of "-O2".

It's maybe time to remove that ?

https://svnweb.freebsd.org/base/head/share/mk/sys.mk?view=annotate#l170

Thank you
Comment 1 Hans Petter Selasky freebsd_committer 2019-01-17 14:25:43 UTC
Looks good to me. Did you test it?
Comment 2 Alexandre martins 2019-01-17 14:32:23 UTC
Unfortunately not. I'll try to do some tests next week.
Comment 3 Ian Lepore freebsd_committer 2019-01-17 16:21:03 UTC
Note that this affects only armv5, not armv6 or armv7.  It's not clear that armv5 will even be supported beyond freebsd 12, so it's probably not worth putting a lot of effort into this.
Comment 4 Alexandre martins 2019-01-17 16:45:39 UTC
There is a regexp at the top of the file that change armv6/armv7 to "arm":

https://svnweb.freebsd.org/base/head/share/mk/sys.mk?view=markup#l16
Comment 5 Alexandre martins 2019-01-18 14:37:28 UTC
Just some quick news:

The code generated is pretty much the same. As expected, clang's optimisation level 1 and 2 produce pretty much the same.

So, no big deal on performances with clang. Maybe for the ones that compile with GCC, the difference may be much bigger.

Longer tests will come next week.