This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.
| Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
|---|---|---|
| Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
| Other format: | [Raw text] | |
diff -y 1/t.c.t10.optimized 3/t.c.t10.optimized main() main() { { int bla; int bla; int foo; int foo; int bar; int bar; int T.1; int T.1; > int pretmp.2; bla = 1; bla = 1; foo = bla * 2; | foo = pretmp.2 = 1 * 2; T.1 = bla * 2; | T.1 = pretmp.2; bar = T.1 + 1; bar = T.1 + 1; goto waffle; goto waffle; return bar; return bar; waffle: waffle: bla = 1; bla = 1; return bar; return bar; } } Note the redundant assignment to T.1.
Where? It is assigned once. Copy propagation would have eliminated it.
It seems PRE doesn't kill those T.[0-9*] variables (both uses and it declarations).
Nor should it. They aren't partially redundant. It did *exactly* what it should in the above case. It eliminated one of the "bla * 2"'s.
| Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
|---|---|---|
| Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |