Re: Function PRESENT and logical combinations
From: Ron Shepard (ronshepard_at_NOSPAM.comcast.net)
Date: 06/16/04
 Next message: James Giles: "Re: Function PRESENT and logical combinations"
 Previous message: rucuti: "FFTW and Fortran."
 In reply to: James Giles: "Re: Function PRESENT and logical combinations"
 Next in thread: James Giles: "Re: Function PRESENT and logical combinations"
 Reply: James Giles: "Re: Function PRESENT and logical combinations"
 Reply: Richard Maine: "Re: Function PRESENT and logical combinations"
 Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Tue, 15 Jun 2004 22:58:12 0500
In article
<kPIzc.72551$Gx4.46495@bgtnsc04news.ops.worldnet.att.net>,
"James Giles" <jamesgiles@worldnet.att.net> wrote:
> > The processor doesn't have to "evaluate each operand",
> > so, in an expression like
> > A = 0 * F(x)
> > the processor might not need to evaluate F(x) and then the
> > sideeffects become undefined. [...]
>
> But this does not constitute a an alternative way of evaluating
> the function, it provides for means of evaluating the *expression*
> as a whole that no longer even references the function. If no
> such alternative means exists, and the function is evaluated,
> that occurs by execution.
What if the statement is simply
A = F(x)
but the local variable A is not referenced afterwards? Is the
compiler allowed to optimize away entirely the function reference?
Or what about something like
A = F(x)
A = 0
or
A = F(x)
if (.true.) A = 1
Can the function execution be optimized away entirely in these cases?
$.02 Ron Shepard
 Next message: James Giles: "Re: Function PRESENT and logical combinations"
 Previous message: rucuti: "FFTW and Fortran."
 In reply to: James Giles: "Re: Function PRESENT and logical combinations"
 Next in thread: James Giles: "Re: Function PRESENT and logical combinations"
 Reply: James Giles: "Re: Function PRESENT and logical combinations"
 Reply: Richard Maine: "Re: Function PRESENT and logical combinations"
 Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
