Forum Discussion

Altera_Forum's avatar
Altera_Forum
Icon for Honored Contributor rankHonored Contributor
11 years ago

-O3 and --util options deprecated

Hi,

In the release notes (http://www.altera.com/literature/rn/rn_aocl.pdf) for 14.1, it says the -O3 and --util <N> options have been deprecated. Why?

If I try to use them, the compiler output on the command line seems to show they still work.

Thanks,

Smith

3 Replies

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    Yes, in some cases -O3 was found not to make the right decisions. You can use it for experimental purposes. However, since there are no immediate plans to improve it, it was decided to deprecate it.

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    I recommend instrumenting your kernel with macros to control things like SIMD lanes, number of compute units, loop unrolling, etc... and pass them in at compile time to implement the same type of optimizations that the -O3 flag did automatically. If you script your compile then you could do your own exploration turning various knobs to see what improves the performance in an automated way.

    Even when -O3 was supported I found it was easier to do my own exploration since it's hard to tell which optimizations work well and which ones do not when the compiler is turning all the knobs for you.