home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #19 / NN_1992_19.iso / spool / comp / arch / 9079 < prev    next >
Encoding:
Text File  |  1992-08-29  |  1.8 KB  |  42 lines

  1. Newsgroups: comp.arch
  2. Path: sparky!uunet!news.univie.ac.at!email!mips.complang.tuwien.ac.at!anton
  3. From: anton@mips.complang.tuwien.ac.at (Anton Martin Ertl)
  4. Subject: Re: Program behaviour (was Re: trapping speculative ops
  5. Message-ID: <1992Aug28.095045.8327@email.tuwien.ac.at>
  6. Sender: news@email.tuwien.ac.at
  7. Nntp-Posting-Host: mips.complang.tuwien.ac.at
  8. Organization: Institut fuer Computersprachen, Technische Universitaet Wien
  9. References: <l9q6e0INN919@exodus.Eng.Sun.COM> <1992Aug27.202845.10747@bcars64a.bnr.ca>
  10. Date: Fri, 28 Aug 1992 09:50:45 GMT
  11. Lines: 29
  12.  
  13. In article <1992Aug27.202845.10747@bcars64a.bnr.ca>, schow@bqneh3.bnr.ca (Stanley T.H. Chow) writes:
  14. |> In article <l9q6e0INN919@exodus.Eng.Sun.COM> chased@rbbb.Eng.Sun.COM (David Chase) writes:
  15. |> >As far as loads and stores go, I am similarly mystified by the
  16. |> >insistence that each and every trap from the source program be
  17. |> >preserved in "very-optimized" code (not code compiled for debugging,
  18. |> >or at a "normal" level of optimization).
  19. |> 
  20. |> Some people (including me), believe that there is only *one* level
  21. |> of optimization. One should always ship the same binary that one
  22. |> tested; doing otherwise expresses immense faith in the ability of
  23. |> one's process to recompile the same source as well as the correctness
  24. |> of ones tools - the compilers, optimizes, linkers.
  25.  
  26. Not only that. Optimization can even uncover bugs in the program that
  27. don't show up in debugging mode. E.g.:
  28.  
  29. f(i, i++);
  30.  
  31. This could work as you intended (say, using the same value of i both
  32. times) in debugging mode, but it could deliver different results when
  33. optimized.
  34.  
  35. The moral of the story: Deliver the same code that you debugged. Let
  36. sleeping bugs sleep:-)
  37.  
  38. - anton
  39. -- 
  40. M. Anton Ertl                    Some things have to be seen to be believed
  41. anton@mips.complang.tuwien.ac.at Most things have to be believed to be seen
  42.