Changes

Jump to navigation Jump to search
204 bytes added ,  19:18, April 5, 2012
add link re code generation problems
Line 111: Line 111:  
Many compilers have one or more optional optimisation levels.  As the level/amount of optimisation increases the compiler tends to spend more and more time doing the optimisation.  The word 'optimisation' is perhaps misleading - perfect optimisation is a very hard problem ([[NP-complete]] or even [[undecidable]]), so a conceptually better term would be 'improvement'.
 
Many compilers have one or more optional optimisation levels.  As the level/amount of optimisation increases the compiler tends to spend more and more time doing the optimisation.  The word 'optimisation' is perhaps misleading - perfect optimisation is a very hard problem ([[NP-complete]] or even [[undecidable]]), so a conceptually better term would be 'improvement'.
   −
Note that the most important criteria for judging a compiler is that it be correct, i.e. it always produces a correct translation of the high-level language, regardless of the amount of optimisation performed. The documentation for some compilers warns that results may be slightly different and/or that certain code may be incorrectly translated at high levels of optimisation.<ref>{{cite web
+
Note that the most important criteria for judging a compiler is that it be correct, i.e. it always produces a correct translation of the high-level language, regardless of the amount of optimisation performed.<ref>{{cite web
 +
| url = http://www.cs.tufts.edu/~nr/cs257/archive/christian-lindig/quest.pdf
 +
| title = Random Testing of C Calling Conventions
 +
| author = Christian Lindig
 +
| accessdate = 2012-04-05}}</ref> The documentation for some compilers warns that results may be slightly different and/or that certain code may be incorrectly translated at high levels of optimisation.<ref>{{cite web
 
| url = http://www.google.co.uk/url?sa=t&rct=j&q=IBM+fortran+compiler+optimisation+level&source=web&cd=3&ved=0CEgQFjAC&url=http%3A%2F%2Fwww-01.ibm.com%2Fsupport%2Fdocview.wss%3Fuid%3Dswg27005174%26aid%3D1&ei=K-Z9T8XAKMWI8gOx76WYDg&usg=AFQjCNEGkE1JxTZVDkQvuwRK39y037UorA
 
| url = http://www.google.co.uk/url?sa=t&rct=j&q=IBM+fortran+compiler+optimisation+level&source=web&cd=3&ved=0CEgQFjAC&url=http%3A%2F%2Fwww-01.ibm.com%2Fsupport%2Fdocview.wss%3Fuid%3Dswg27005174%26aid%3D1&ei=K-Z9T8XAKMWI8gOx76WYDg&usg=AFQjCNEGkE1JxTZVDkQvuwRK39y037UorA
 
| title = Code optimization with the IBM XL Compilers
 
| title = Code optimization with the IBM XL Compilers
SkipCaptcha
265

edits

Navigation menu