------- 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