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