------- Comment #3 from dann at godzilla dot ics dot uci dot edu 2006-06-13 14:22 ------- (In reply to comment #2) > (In reply to comment #1) > > Hmm, it should have produced G.3, G.n, at least I would have thought. > > > > No, we intentionally use the same variable for the lexically identical > expressions, see internal_get_tmp_var/lookup_tmp_var. Original intention was > to make PRE and other redundancy elimination optimization passes more > efficient > (this was essential especially for the old SSAPRE pass that used lexical > equality of expressions to check for redundancies). These reasons are no > longer relevant, but keeping the code saves a significant amount of memory and > compile time (I tried removing the code a few months ago, but since it slows > down compilation by some 1-2%, I never bothered with posting the patch).
Using the same variable is surely good, wouldn't it be even better to not create the redundant "G.2 = G" assignments in this PR? -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27809