title: What is the appropriate usage of these profiling switches?
body: <p>I'm still pretty new to GCC and I'm wondering how exactly do I use certain profiling switches.</p>
  
  <p>I've read the GCC manual entries for <code>-ftree-loop-ivcanon</code> and <code>-fivopts</code> (neither of which are implied by <code>-fprofiled-generate/use</code>) and while I have a (relatively) good idea of what they do I don't know where I should use them or if I should use them at all.</p>
  
  <p>Should I use the flags in a combined compilation?</p>
  
  <p><code>g++ Example.cxx -o Example.exe -Wall -ftree-loop-ivcanon -fivopts</code></p>
  
  <p>A compilation only?</p>
  
  <p><code>g++ Example.cxx -o Example.o -c -Wall -ftree-loop-ivcanon -fivopts</code></p>
  
  <p>Or a linking only?</p>
  
  <p><code>g++ Example.o -o Example.exe -Wall -ftree-loop-ivcanon -fivopts</code></p>
  
  <p>Should I only use these flags when profiling is enabled or can I use them with -On?</p>
  
  <p>And lastly if I do use these when profiling should I use them with the generate switch or the use switch, or both?</p>