Altera_Forum
Honored Contributor
14 years agoComplete list of optimization flags for the Nios II compiler?
Hello all. Sorry if this has already been answered, I couldn't find it anywhere on the forums or online.
We're migrating a large amount of source code written in C from an older processor to an Altera FPGA. Does anyone know if there is a way to prompt Nios II to output the complete list of compiler optimization flags? The GCC compiler allows for a '-Q --help=optimizers' flag to list this sort of thing. I note that the first level of optimization (-O or -O1) is different between the GCC and the Nios II compilers. I'm not sure why some of the flags listed in the GCC literature aren't in the Nios II. For example, we're seeing the Nios II remove what it believes to be dead code, similar to what the GCC would do with a '-fdce' flag. However no such flag exists (as far as I can tell) for the Nios II. Simply disabling optimization altogether would be a solution to this issue, but I'd like to avoid doing that if possible. Any insight would be immensely appreciated!