AVR: Add -moptimize option for AVR-specific passes
New -moptimize option simplifies enabling/disabling AVR-specific optimizations.
A new command-line option, -moptimize, has been introduced for the AVR target. This option acts as a convenient collection switch, allowing developers to easily enable or disable a set of eight AVR-specific optimization passes. This simplifies build configurations and control over target-specific code improvements.
In Details
This commit introduces the -moptimize target option for the AVR backend. This option serves as a user-friendly alias to control a specific group of eight AVR-specific optimization passes. The implementation involves adding the option to avr.opt, a new static helper function avr_enable_optimizations in avr-common.cc to manage the pass enablement, and documentation in invoke.texi.
- AVR
- A family of microcontrollers developed by Atmel (now Microchip Technology), popular in embedded systems and hobbyist projects.
- optimization passes
- Individual stages within the compiler's optimization pipeline that perform specific transformations to improve code performance, size, or other metrics.