This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: rx-elf: sched2 dependency question


> That said, I suppose it wouldn't hurt to modify sched-deps
> to treat a SET+REG_UNUSED as a CLOBBER.

Early in sched_analyze_reg, check for ref==USE and a REG_UNUSED note,
and change ref to CLOBBER?  I tried it, it didn't seem to help...

Index: sched-deps.c
===================================================================
--- sched-deps.c	(revision 164652)
+++ sched-deps.c	(working copy)
@@ -2116,12 +2116,16 @@ sched_analyze_reg (struct deps_desc *dep
   if (!reload_completed && sel_sched_p ()
       && (regno >= max_reg_num () - 1 || regno >= deps->max_reg))
     extend_deps_reg_info (deps, regno);
 
   maybe_extend_reg_info_p ();
 
+  if (ref == SET
+      && find_regno_note (insn, REG_UNUSED, regno))
+    ref = CLOBBER;
+
   /* A hard reg in a wide mode may really be multiple registers.
      If so, mark all of them just like the first.  */
   if (regno < FIRST_PSEUDO_REGISTER)
     {
       int i = hard_regno_nregs[regno][mode];
       if (ref == SET)


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]