??? 03/10/08 23:46 Read: times |
#152105 - Not so fantastic? Responding to: ???'s previous message |
David Prentice said:
We are all agreed that a compiler is free to do lots of optimisations. Again, it's not just about optimisation - the compiler is free to implement the source code in any way it sees fit We agree that a software delay requires careful cycle counting whether in assembly or HLL. Yes. A different compiler, version or flag invocation can produce different code. Definitely. To state that the compiler will generate different code on each identical invocation is something that I would like to see. Yes, it's probably pretty unlikely in practice. However, Keil's "register colouring" optimisation can give interesting effects of one build on the next... I am assuming that we are talking about a function block being compiled differently due to unrelated source code change in other function blocks. Yes - I gave the specifc example of where aparently "unrelated" code can chage the compiler's choice of what to put into registers. Optimisations like Keil's "register colouring" and Linker code packing also take a general overview of the code - so must introduce more possibilities for this... |