Richard Henderson <rth@redhat.com> wrote on 31/08/2004 09:36:08:
On Mon, Aug 30, 2004 at 10:40:16PM -0700, Devang Patel wrote:
OK. But as you say, how to handle PARM_DECL ?
T3 = P ? T2 : T1.
In the case of PARM_DECL, T1 as the default definition *does* have
a defined meaning -- the value of the parameter as given by the
caller.
if (COND)
A[i] = x;
do you think, we should introduce temp. here, like
t = A[i];
if (COND)
t = x;
A[i] = t;
For a conditional store, you must either do this or fail the
transform.
There are no other alternatives.
There may be another alternative for conditional stores. If the
compiler
has some scratch-pad address, into which it can always store without
causing any trouble, we could do
t = (COND ? &A[i] : scratch-pad-address)
*t = x
which also applies to conditional loads.