Skip to content

optimization flags  #292

@catfact

Description

@catfact

following discussion from lines:
https://llllllll.co/t/modern-c-programming-tips-and-tricks/3039/124?u=zebra

we need to free up some more code space in bees, so it's probably time to move away from -O3

from the full list of gcc optimization options, these are the ones i've found to be supported by avr32-gcc:

OPTIMIZATION = -finline-functions \
-funswitch-loops \
-fpredictive-commoning \
-fgcse-after-reload \
-ftree-loop-distribution \
-fvect-cost-model \
-fpeel-loops \
-fipa-cp-clone \
-fthread-jumps \
-falign-functions \
-falign-jumps \
-falign-loops \
-falign-labels \
-fcaller-saves \
-fcrossjumping \
-fcse-follow-jumps \
-fcse-skip-blocks \
-fdelete-null-pointer-checks \
-fexpensive-optimizations \
-fgcse -fgcse-lm \
-finline-small-functions \
-findirect-inlining \
-fipa-cp \
-foptimize-sibling-calls \
-fpeephole2 \
-freorder-blocks-and-partition \
-freorder-functions \
-frerun-cse-after-loop \
-fsched-interblock \
-fsched-spec \
-fschedule-insns \
-fschedule-insns2 \
-fstrict-aliasing \
-ftree-builtin-call-dce \
-ftree-switch-conversion \
-ftree-pre \

currently experimenting with which flags have the greatest impact on code size.

profiling for speed is quite a bit harder but will construct some suitable scenes and start flipping GPIO in main event loop.

any advice would be greatly appreciated

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions