Using IPO may reduce code size because it enables dead code elimination and suppresses generation of code for functions always inlined or proven never to be called during execution.
Options to specify:
Linux*: | -ipo |
Windows*: | /Qipo |
Advantages of this method: |
Depending on the code characteristics, this optimization can reduce executable size and improve performance. |
Disadvantages of this method: |
Binary size can increase depending on code/application. |
This method is not recommended if you plan to ship object files as part of a final product.