Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.

  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Chapter 11. Compiler Performance Tuning > Debugging Optimization Problems

11.9. Debugging Optimization Problems

Optimizer bugs are usually a rare occurrence. However, if an optimizer bug does occur, tracking one down can be difficult. If an optimizer bug is suspected, then the first thing to do is to disable optimization for the entire program and try again. If the bug goes away, then an optimizer bug may be at fault; otherwise the bug is most likely due to a coding error.

If the problem disappeared with optimization off, the next step is to determine which file is causing the bug. If a debugger shows that the fault is in a particular routine, it is often best to start by turning off optimization on just the file that contains that routine. If the issue goes away, then some code within that file contains the problem.


  

You are currently reading a PREVIEW of this book.

                                                                                                                    

Get instant access to over $1 million worth of books and videos.

  

Start a Free Trial


  
  • Safari Books Online
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint