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

AP_Generator: apply -Os to all cpp files #28692

Merged
merged 1 commit into from
Dec 17, 2024

Conversation

peterbarker
Copy link
Contributor

Board                    AP_Periph  blimp  bootloader  copter  heli  iofirmware  plane  rover  sub
CubeBlack                           -656   *           -664    -656              -664   -664   -656
CubeOrange-periph-heavy  *                                                                     
CubeOrangePlus                      -672   *           -664    -672              -672   -672   -664
CubeRedPrimary                      -32    *           -40     -40               -40    -40    -32
Durandal                            -664   *           -672    -664              -672   -672   -664
Hitec-Airspeed           *                                                                     
KakuteH7-bdshot                     -40    *           -32     -40               -40    -32    -32
MatekF405                           *      *           *       *                 *      *      *
Pixhawk1-1M-bdshot                  *                  *       *                 *      *      *
f103-QiotekPeriph        *                                                                     
f303-Universal           *                                                                     
iomcu                                                                *                         
revo-mini                           *      *           *       *                 *      *      *
skyviper-journey                                       -32                                     
skyviper-v2450                                         *                                       
111

@amilcarlucas
Copy link
Contributor

Aren't all generators disabled on 1MB boards?
Also, this is just for 2MB boards, right?

Nice space saving!

@tpwrules
Copy link
Contributor

I think we should pull the trigger on -Os to all 2MB boards. It's already enabled for all 1MB boards.

@andyp1per
Copy link
Collaborator

I think we should pull the trigger on -Os to all 2MB boards. It's already enabled for all 1MB boards.

Nah, the performance boost is quite substantial - if we don't need to we shouldn't. There are many 2Mb boards that can easily accommodate -O2

@peterbarker
Copy link
Contributor Author

Aren't all generators disabled on 1MB boards?

Yes.

Also, this is just for 2MB boards, right?

No - this means that if you choose to enable a generator on a 1MB board locally or on custom.ardupilot.org the feature will come in -Os

Nice space saving!

Considering it is essentially free, yes. tridge pointed out we should be doing this in virtually every new .cpp file - the majority of code is not timing sensitive.

@tridge tridge merged commit 52291b6 into ArduPilot:master Dec 17, 2024
99 checks passed
@peterbarker peterbarker deleted the pr/generator-os branch December 17, 2024 04:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants