[tree-ssa] reaching def. question

law@redhat.com law@redhat.com
Tue Mar 16 23:44:00 GMT 2004


In message <1079475458.3173.461.camel@localhost.localdomain>, Diego Novillo wri
tes:
 >On Tue, 2004-03-16 at 16:59, Devang Patel wrote:
 >
 >> S1: a_1 = x;
 >> S2: if (...)
 >> S3:   a_2 = b;
 >> 
 >> Now, to if-convert S3, I need to know if a_2 is first def. of variable 
 >> 'a'
 >> or not. Based on that info I can replace S3 with
 >> 
 >> S3: MODIFY_EXPR <a_2, COND_EXPR < c, b, a_1>>
 >> 
 >> OR
 >> 
 >> S3: MODIFY_EXPR <a_2, COND_EXPR < c, b, NULL>>
 >> 
 >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).
It seems to me that to do that he must first take the affected variables
out of SSA form.  Otherwise how does the renamer know which instance of
"a" ought to be used?


jeff





More information about the Gcc mailing list