------- Comment #2 from rakdver at gcc dot gnu dot org 2006-06-13 14:09 ------- (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). -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27809