For C6000 Linear Assembly, it was suggested that register symbols should be used for only one thing. The quote, if I remember correctly was, "Use register symbols like Kleenex, use them only once." In this way, the Assembly Optimizer would not be confused by reusing the register symbol; that is, it wouldn't mistake the reuse of the symbol as a definition of dependency between one use of the symbol versus another.
I was asked today if this hint has any relevance to the C compiler. Would there be any optimization benefit by using different variables for different information, versus trying to be "clever" and reuse a variable for multiple data throughout a function (or program).
Obviously, one would have to balance the use of additional variables against the potential increase in data size, but using a few more local variables in a function would most likely be negligible.
Just curious,
Scott