This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug middle-end/41004] missed merge of basic blocks
- From: "rguenth at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 8 Aug 2009 10:36:19 -0000
- Subject: [Bug middle-end/41004] missed merge of basic blocks
- References: <bug-41004-17659@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #3 from rguenth at gcc dot gnu dot org 2009-08-08 10:36 -------
I would suggest to closely look at SSA expansion as well. There is I think
still the regression from pre-SSA expand that it doesn't expand PHI nodes
optimally at -Os (pre-SSA expand split common PHI args into extra blocks to
minimize copy instructions which is something that can be done as a tree
level transform). Like
BB5:
# a_1 = PHI <a_2(2), a_2(3), b_3(4)>
to
BB6:
# tmp_4 = PHI <a_2(2), a_2(3)>
BB5:
# a_1 = PHI <tmp_4(6), b_3(4)>
which we usually don't want and in fact undo during mergephi. But it needs
one less copy if a_2 and tmp_4 can be coalesced together.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41004