Re: InfiniBand-ocrdma: Delete unnecessary variable initialisations in 11 functions

From: SF Markus Elfring
Date: Fri Jan 15 2016 - 11:25:28 EST

> GCC supported it before 1999 when I saw it first time. My assumption
> that in 2016 all compilers are doing such optimization now.

Interesting …

> I would be glad to hear an example of modern compiler which doesn't
> support this simple optimization.

Would you like to take into account any other source code analysis approaches?

>> Will any configuration parameters and command arguments become relevant
>> to improve also a corresponding software comparison?
> Please suggest us, you are proposing this change, and not me.

Which combination of hardware and software versions would you find representative
for a corresponding system check?

>>> The proposed change won't affect performance at all.
>> Will unneeded variable assignments be really optimised away by default?
> Yes

Can it be that this result will depend on special parameters so that data flow
analysis and optimisation will be performed in the way you seem to expect?

> If you are interested in saving space of one latter, you need to take into
> account git database increase, do you?

There are also other aspects to consider:

* Do you insist to initialise a return code at the beginning of every function
with a non-void return type?

* Does each bit of extra information can result also in unwanted consequences?

* Is this a specific source code review concern?

* Can this software be improved a bit more only if we dare to talk about
potential update candidates?