Selecting gcc optimisation flags equivalent to -O1

前端 未结 2 1901
陌清茗
陌清茗 2021-01-23 10:35

I have small program that performs much better when compiled with -O1 as opposed to no optimisation. I am interested in knowing what optimisation(s) done by the com

2条回答
  •  夕颜
    夕颜 (楼主)
    2021-01-23 11:26

    How about using -S option to check the produced assembler?

    From two experiments using also "my_program.c" it seems, that -O0 option disables all optimizations regardless of the long list of suggested algorithms.

提交回复
热议问题