Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BUILD: Modernize default code optimization strategy #1285

Closed
wants to merge 5 commits into from

Conversation

@ccawley2011
Copy link
Member

ccawley2011 commented Aug 16, 2018

This new strategy eliminates platform-specific optimization flags
and replaces them with -Os or -O2 (plus auto-vectorization where
supported), which should provide the best balance of performance
and memory usage across pretty much all devices. It also
eliminates forced optimizations to ensure that the build system
operates in a consistent manner.

When optimization is auto, the newer -Og flag will be used when
available to get "free" optimizations that don't impact debugging.

Originally from PR #1128

@sev-
Copy link
Member

sev- commented Aug 18, 2018

This change is controversial and needs to be checked by the affected porters. As we're obviously losing few platform-specific cases, like the set of directives for DC, and -O0 for the recent PSP2 port in debug build mode.

Generalising like that loses flexibility big time.

Why not reduce it to introducing the new command line switch, but leave the platform-specific overrides?

csnover and others added 5 commits Oct 31, 2017
This new strategy eliminates platform-specific optimization flags
and replaces them with -Os or -O2 (plus auto-vectorization where
supported), which should provide the best balance of performance
and memory usage across pretty much all devices. It also
eliminates forced optimizations to ensure that the build system
operates in a consistent manner.

When optimization is auto, the newer -Og flag will be used when
available to get "free" optimizations that don't impact debugging.
These flags either crash the compiler on -Og level because they
are incompatible, or are not needed because they are already
included in -Os.
The new default optimization level causes an internal compiler error.
@ccawley2011 ccawley2011 force-pushed the ccawley2011:optimizations branch from d02085e to 346ed3f Aug 24, 2018
@sev-
Copy link
Member

sev- commented May 12, 2020

Closing this as too ambitious and not in alignment with our ports.

@sev- sev- closed this May 12, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

3 participants
You can’t perform that action at this time.