This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Optimiser Problems - common block subroutines

Does any one else have problems with the higher levels of optimisation available to C51?

With common block subroutines switched on, sometimes, just sometimes, C51 will generate completely wrong code.

I have noticed that the problems are often associated with pointers that are automatic variables and where there is a variable of the same name in another function.

Common block subroutines have a dramatic affect on code size, but I don't use this level of optimisation because it just does not seem to be reliable.

Parents
  • Graham,

    "whereas levels 10 and 11 have very little to offer"

    Indeed, you're seeing a slight increase in code size over level 9 with 'Favour size' as I am. My projects all use a great deal of floating point, I build with linker code packing on and integer promotion off.

    Perhaps Keil would like to comment on whether there are any specific situations where 10 and 11 make a significant improvement?

    Stefan

Reply
  • Graham,

    "whereas levels 10 and 11 have very little to offer"

    Indeed, you're seeing a slight increase in code size over level 9 with 'Favour size' as I am. My projects all use a great deal of floating point, I build with linker code packing on and integer promotion off.

    Perhaps Keil would like to comment on whether there are any specific situations where 10 and 11 make a significant improvement?

    Stefan

Children
No data