[tree-ssa] a tree-ssa beginner question - creating new variables

Dorit Naishlos DORIT@il.ibm.com
Sun Dec 21 19:53:00 GMT 2003





I thought I figured out how to create new temporaries in tree-ssa, but
looks like my first toy-example passed compilation by pure luck. The second
toy-example failed during rewrite_out_of_ssa() at the end of
create_ssa_var_map() in tree-ssa-live.c, with the error: "Variable c used
in real and virtual operands".

As far as I could see, the reason this happens is that for all the new
variables that I created, their 'var_ann (  )->uid' is 0, which in this
case happens to also be the uid of the var_ann of variable 'c' (which is a
user declared variable).

what's the correct way to create temp variables ?

(the way I created new vars:

T0 = create_tmp_var (some_type, some_name);
create_var_ann (T0);
set_is_used (T0);)


Another question:

Is it ok to create ssa names to new variables as I am introducing new
variables/stmts, or should I call rewrite_to_ssa at the end of my
optimization pass instead?


thanks,

dorit



More information about the Gcc mailing list