home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #20 / NN_1992_20.iso / spool / comp / sys / sgi / 13500 < prev    next >
Encoding:
Internet Message Format  |  1992-09-10  |  1.1 KB

  1. Path: sparky!uunet!haven.umd.edu!darwin.sura.net!zaphod.mps.ohio-state.edu!cis.ohio-state.edu!rutgers!uwvax!meteor!brianp
  2. From: brianp@meteor.wisc.edu (Brian Paul)
  3. Newsgroups: comp.sys.sgi
  4. Subject: How do I diagnose an optimization (-O2) problem?
  5. Message-ID: <1992Sep10.221848.14725@meteor.wisc.edu>
  6. Date: 10 Sep 92 22:18:48 GMT
  7. Organization: University of Wisconsin, Meteorology and Space Science
  8. Lines: 21
  9.  
  10.  
  11.  
  12. One of the modules (in C) in our application does not behave correctly when
  13. compiled with -O2.  When compiled with -O1 it runs fine.  I understand
  14. that optimizations are not always 100% reliable so I'd like to rewrite
  15. whatever code is causing the problem.
  16.  
  17. Question:  how does one go about finding the statement(s) causing the
  18. optimization problem?
  19.  
  20. I've run lint on the module but didn't find anything unusual.
  21. Also, I've tried compiling with "-O2 -Wo,loopunroll,0" to prevent loop
  22. unrolling but that didn't make any difference.
  23.  
  24. I was hoping that there would be #pragma's I could use to turn optimization
  25. on/off for various statement blocks to find the problem.  But I haven't
  26. found anything in the documentaion.  Any suggestions?
  27.  
  28. Thanks,
  29.  
  30. -Brian Paul
  31.