On 7/31/2014 1:27 AM, Tobias Pankrath wrote:

In terms of what they practically do, they have *nothing* in common, their
functions are entirely orthogonal.

They are inextricably entangled. Consider:

   if (x == 0) abort();   // essentially what assert(x) does
   ... at this point, the optimizer knows, beyond doubt, that x!=0 ...
   if (x)  // optimizer can remove this check
      ...

As far as I unterstand, this would be the behaviour without -release. With
-release the code becomes

if(x)
     ...

and the optimizer cannot remove the (second) check. Or am I missing something?

My intention is that the runtime check would be omitted, but the information would still be fed to the optimizer. This is not currently implemented.

Reply via email to