-ipa

Controls the interprocedural analysis optimization.

Syntax
  -ipa file | function | off | program | program-final

  

The options are as follows:

  -ipa off or -ipa function

  

Turns off the interprocedural analysis. This is default.

  -ipa file 

  

Turns on the interprocedural analysis at file level. For example:

  mwccmcf -c -ipa file file1.c file2.c

  

This applies optimization to file file1.c and file2.c but not across both files. This command generates object files file1.o and file2.o which can later be linked to generate executable file.

  -ipa program  

  

Turns on the interprocedural analysis at program level use. For example:

  mwccmcf -o myprog.elf -ipa program file1.c file2.c

  

This generates object code, applies this optimization among all resulting object code files to link it to generate out file myprog.elf.

To separate compile and linking steps for IPA, follow the steps listed below:

  mwccmcf -c -ipa program file1.c

  
  mwccmcf -c -ipa program file2.c

  

Compiles file1.c and file2.c into regular object files and also intermediate optimized obj files called file1.irobj and file2.irobj.

To link the object files, refer to the .o files or .irobj files like:

  mwccmcf -o myprog.elf -ipa program file1.o file2.o

  

or

  mwccmcf -o myprog.elf -ipa program file1.irobj 
  file2.irobj

  
  -ipa program-final | program2

  

Invokes the linker directly.

For example:

  mwccmcf -ipa program-final file1.irobj file2.irobj

  
  mwldmcf -o myprog.elf file1.o file2.o