This is the mail archive of the gcc-patches@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: PATCH: Fix CSE handling of COMPARE


>>>>> "Franz" == Franz Sirl <Franz.Sirl-kernel@lauterbach.com> writes:

    Franz> the cse part breaks linux-2.4 kernel compiles on
    Franz> powerpc-linux-gnu, the appended code fragment fails to
    Franz> optimize away the call to __bad_udelay.

I believe you.

I also believe that:

   a) any code that *depends* on the compiler making a particular
      optimization is broken (since then it's not an optimization
      any more, but rather a language feature), and 

   b) I don't know how to re-enable the optimization without 
      generating wrong code in the general case.

If the intention of the code is to check that 1000 is never greater
than 1000000, then an `assert' would make more sense.

Of course, I'd like to fix the original bug without pessimizing the
generated code.  

Is there anyone with ideas about what to do here?

--
Mark Mitchell                   mark@codesourcery.com
CodeSourcery, LLC               http://www.codesourcery.com


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