Re: [GCC 9][RFC][PATCH] Optimize PHIs with constant arguments better

2017-12-05 Thread Jeff Law
On 12/04/2017 02:25 PM, Michael Matz wrote: > Hi, > > On Thu, 30 Nov 2017, Jeff Law wrote: > >> And after PHI propagation we have: >> # m_5 = PHI <10(5), 12(6), 14(7)> >> # _2 = PHI <10(5), 12(6), 14(7)> >> # _3 = PHI <320(5), 384(6), 448(7)> >> : >> goto ; [100.00%] >> >> DCE will come a

Re: [GCC 9][RFC][PATCH] Optimize PHIs with constant arguments better

2017-12-04 Thread Michael Matz
Hi, On Thu, 30 Nov 2017, Jeff Law wrote: > And after PHI propagation we have: > # m_5 = PHI <10(5), 12(6), 14(7)> > # _2 = PHI <10(5), 12(6), 14(7)> > # _3 = PHI <320(5), 384(6), 448(7)> > : > goto ; [100.00%] > > DCE will come along and wipe out m_5 and _2 if they are unused. When I di

[GCC 9][RFC][PATCH] Optimize PHIs with constant arguments better

2017-11-30 Thread Jeff Law
This addresses some code quality regressions with some work scheduled for gcc-9. However, if anyone is aware of BZs that could be helped with this patch, don't hesitate to pass them along. Depending on their severity we could always re-evaluate the plan for this patch. The patch optimizes sequ