On 2023/11/13 9:11, juzhe.zh...@rivai.ai wrote:
Ah, nice!  How configurable are the bit ranges?
I think Lehua's patch is configurable for bit ranges.
Since his patch allow target flexible tracking subreg livenesss according to REGMODE_NATURAL_SIZE

+/* Return true if REGNO is a pseudo and MODE is a multil regs size.  */
+bool
+need_track_subreg (int regno, machine_mode reg_mode)
+{
+  poly_int64 total_size = GET_MODE_SIZE (reg_mode);
+  poly_int64 natural_size = REGMODE_NATURAL_SIZE (reg_mode);
+  return maybe_gt (total_size, natural_size)
+        && multiple_p (total_size, natural_size)
+        && regno >= FIRST_PSEUDO_REGISTER;
+}

It depends on how targets configure REGMODE_NATURAL_SIZE target hook.

If we return QImode size, his patch is enable tracking bit ranges 7 bits subreg.

Yes, the current subreg_ranges class provides remove_range/add_range/remove_ranges/add_ranges interfaces to modify ranges. Each subreg_range contains start and end fields representing the range [start, end). For live_subreg problem, the value returned by REGMODE_NATURAL_SIZE is used as the unit, for bit track like Jeff's side, it can be used bit as the unit.

--
Best,
Lehua (RiVAI)
lehua.d...@rivai.ai

Reply via email to