[tree-ssa] reaching def. question
Devang Patel
dpatel@apple.com
Tue Mar 16 22:32:00 GMT 2004
On Mar 16, 2004, at 2:17 PM, Diego Novillo wrote:
> Hmm, you could always if-convert S3 to MODIFY_EXPR <a, COND_EXPR <c, b,
> a>> and then mark 'a' for rewriting. After if-conversion, the renamer
> will correctly pick up a_1 or a_0 (ie, a's default definition).
OK. We're one the same page. I tried following and it did not work.
I have:
# BLOCK 1
# PRED: 15 [100.0%] (fallthru) 13 [100.0%] (fallthru)
# A_24 = PHI <A_18(15), A_10(13)>;
# i_22 = PHI <i_20(15), 0(13)>;
<L0>:;
# VUSE <A_24>;
T.0_26 = A[i_22];
I convert it into:
# BLOCK 1
# PRED: 15 [100.0%] (fallthru) 13 [100.0%] (fallthru)
# A_24 = PHI <A_18(15), A_10(13)>;
# i_22 = PHI <i_20(15), 0(13)>;
<L0>:;
# VUSE <A_24>;
T.0_26 = if (1)
{
A[i_22];
}
else
{
T.0_26
};
Now, I mark this modify expr's operand 0's SSA_NAME_VAR for rewriting.
After ssa rewriting I get,
# BLOCK 1
# PRED: 15 [100.0%] (fallthru) 13 [100.0%] (fallthru)
# A_11 = PHI <A_10(13), A_3(15)>;
# i_22 = PHI <i_20(15), 0(13)>;
<L0>:;
T.0_19 = if (1)
{
A[i_22];
}
else
{
A_26
};
Maybe I am not marking it properly for rewrite?
--
Devang
More information about the Gcc
mailing list