https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114729

Vineet Gupta <vineetg at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |ASSIGNED

--- Comment #17 from Vineet Gupta <vineetg at gcc dot gnu.org> ---
There's one more place where ECC pressure reduction is being ignored to favor
more spills.

With the following non production change (ref to fix4)

@ -2401,12 +2401,18 @@ model_excess_group_cost (struct model_pressure_group
*group,
   int pressure, cl;

   cl = ira_pressure_classes[pci];
-  if (delta < 0 && point >= group->limits[pci].point)
+
+  if (delta < 0)
+  {
+    if (point >= group->limits[pci].point)
     {
       pressure = MAX (group->limits[pci].orig_pressure,
                      curr_reg_pressure[cl] + delta);
       return -model_spill_cost (cl, pressure, curr_reg_pressure[cl]);
     }
+    else
+      return delta;
+  }

We see further spill reduction:

$ -std=c++03 -Ofast -g -S -static -fno-lto -ftree-vectorize  ML_BSSN_RHS.cpp
-march=rv64gcv_zvl256b_zba_zbb_zbs_zicond_zfa  -mrvv-vector-bits=zvl
--verbose-asm
$ grep sfp ML_BSSN_RHS.s | wc -l

--- tc-up-240920-sched1-baseline                : 48,523
--- tc-up-240920-sched1-fix1-ECC                : 35,403
--- tc-up-240920-sched1-fix1-fix4-ECC-fixes     : 28,991


And following are the qemu dynamic icounts for cactu for corresponding builds

2,544,112,250,412       # baseline
2,185,048,432,166       # fix1 ECC
2,048,796,612,056       # fix1 + fix4 ECC

Reply via email to