On 7/10/20 4:14 AM, Jiufu Guo wrote:
Thanks so much for your time and kindly help!!!
And I run your patch on SPEC2006 with: https://gcc.gnu.org/pipermail/gcc-patches/2020-July/549728.html Doing that I see just few changes: diff -qr /tmp/before /tmp/after Files /tmp/before/Meat.fppized.f90.000i.profile-report and /tmp/after/Meat.fppized.f90.000i.profile-report differ Files /tmp/before/bezier.cpp.000i.profile-report and /tmp/after/bezier.cpp.000i.profile-report differ Files /tmp/before/module_big_step_utilities_em.fppized.f90.000i.profile-report and /tmp/after/module_big_step_utilities_em.fppized.f90.000i.profile-report differ Files /tmp/before/module_cu_bmj.fppized.f90.000i.profile-report and /tmp/after/module_cu_bmj.fppized.f90.000i.profile-report differ Files /tmp/before/momx2.f.000i.profile-report and /tmp/after/momx2.f.000i.profile-report differ Files /tmp/before/momx3.f.000i.profile-report and /tmp/after/momx3.f.000i.profile-report differ Files /tmp/before/tml.f.000i.profile-report and /tmp/after/tml.f.000i.profile-report differ Files /tmp/before/tranx2.f.000i.profile-report and /tmp/after/tranx2.f.000i.profile-report differ Files /tmp/before/tranx3.f.000i.profile-report and /tmp/after/tranx3.f.000i.profile-report differ But I see few regression, e.g.: $ cat bezier.ii int bezier_value_t, bezier_value_du_1; int bezier_value_u[4], bezier_value_du[4]; void bezier_value() { int i = 1; for (; i < 4; i++) { bezier_value_u[i] = 1; bezier_value_du[i] = i * bezier_value_u[i - 1]; bezier_value_t = bezier_value_du_1; } } $ g++ bezier.ii -c -march=native -O3 -Wno-multichar -Wno-aggressive-loop-optimizations -fdump-tree-pcom=/tmp/bad.txt ... And your patch changed: - <bb 15> [local count: 134217728]: + <bb 15> [local count: 89478486]: where the function looks like: <bb 3> [local count: 268435456]: ... if (ivtmp_45 > 1) goto <bb 15>; [50.00%] else goto <bb 10>; [50.00%] <bb 15> [local count: 89478486]: goto <bb 3>; [100.00%] So 89478486 != 268435456 / 2. That seems a regression caused by your patch. Can you please check it? Martin