This is the mail archive of the gcc@gcc.gnu.org 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]

Re: New problems with gcc-2.8.0 based code - NOW FIXED!


When we consider whether to support a certain optimization, we need to
keep in mind why we want optimizations in the first place.

An optimization is worth having if it gives users a substantial
speedup, substantially often.  In that case, it may be worth some
sacrifice to have the optimization.  But if the optimization happens
only rarely and provides small benefit, then it is not worth paying
any price for--especially not if the users pay the price.

Perhaps there are some cases of asm without outputs where it is safe
to permit moving the asm.  But it is clear that the benefits to be had
by such optimization are little and rare.  So given the choice between
permitting this optimization in rare cases, and any other benefit that
really matters, the latter wins hands down.

Therefore it is certain that GCC should do what the manual now says:
an asm with no outputs is treated as volatile.


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