Tool/software: TI C/C++ Compiler
I have several loops in my code that iterate based on the value of a #define constant (number of ADC channels in use). The same base code will be applied to several different boards which will have a different value for this constant. I need the performance improvement from loop unrolling, but would like to simply change the value of this constant and not manually write out the loops for each variation. I'm not worried about code size in this application.
From searching around the forum I found the UNROLL and MUST_ITERATE pragmas, but these seem to be only for TMS devices, since they were not recognized when I tried to use them and are not in the MSP430 Compiler User Guide (slau132v).
My optimization settings have been --opt_level = 3 and --opt_for_speed = 5. I also have the --gen_opt_info flag set to level 2, will loop unrolling be documented in the output file? I observe the code size and performance increase when I manually unroll the loops so I know the compiler is not currently unrolling the loops.
How can I tell the compiler that it is okay to unroll these loops?
Thanks.