This is the mail archive of the mailing list for the GCC project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: why not consfold sin(const)

Robert Dewar wrote:
> ...
> Generally speaking in compiler-development-land, far too much effort
> goes into optimizations that have no measureable significant value.
> So the best argument for a given optimization is to show a real program
> where the optimization would make a real difference.
> I remember from SPITBOL times that many people would write to us
> suggesting an optimization. We then imposed a rule that we would
> only publish such suggestions in the newsletter if they were
> accompanied by a sample program where the optimization would
> speed things up at least a few percent. The flow of suggestions
> completely dried up :-)

OK, but in our concrete case we already have some optimizing logic in place
which looks if the argument of sin() is zero or if the argument of log() is one,
and in the case of sqrt always replaces with const. So if this already present
logic is worth enough to be there in the compiler, i fail to see why a full consfolder
is not worth enough. It's definitely not the case that it's something too complex
for implementing. In fact it's exactly as complex as the currently present logic.
Surely the precision is not much of an issue either, since -ffast-math
implies possible non-strict copliance with standards, precision requirements, etc.


Do you Yahoo!?
Declare Yourself - Register online to vote today!

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]