This is the mail archive of the gcc-patches@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: fix up hot/cold partitioning on ports that don't have long conditional branches


[Sorry for the delay]

> > The patch contains long lines.
>
> Didn't know we had switched over to caring that much.  Want me to fix all
> of gcc/*.[ch]?

Nope, just not introduce new long lines.

> Ok?

Almost.  It looks like we now pass twice the same argument to follow_jumps, 
i.e. we have LABEL == JUMP_LABEL (JUMP).  So I'd just pass JUMP:


  /* Follow any unconditional jump at JUMP's target label; return the ultimate
     label reached by any such chain of jumps.  If the target label is not
     followed by a jump, return it.  If the chain loops or we can't find end,
     return it as well, since that tells the caller to avoid changing the insn.
     If the chain of jumps ever crosses a section boundary, and the port
     doesn't have long condition branches and JUMP is a conditional branch,
     return the first such label before any such crossing.  */
 
 static rtx
-follow_jumps (rtx label)
+follow_jumps (rtx jump)


+      /* If a label crosses a section boundary and we're thinking
+	 about changing a conditional jump to be a conditional jump
+	 across that boundary, don't do it if the port doesn't have
+	 long conditional branches.  We can however jump to the label
+	 just before we cross such a boundary.  */
+      if (!HAS_LONG_COND_BRANCH
+	  && find_reg_note (insn, REG_CROSSING_JUMP, NULL_RTX)
+	  && any_condjump_p (jump))
+	return value;

"If a jump crosses a..."


 	  if (target_label && next_active_insn (target_label) == next
-	      && ! condjump_in_parallel_p (insn))
+	      && ! condjump_in_parallel_p (insn)
+	      && find_reg_note (insn, REG_CROSSING_JUMP, NULL_RTX) == NULL_RTX)

Either !find_reg_note here or find_reg_note (...) != NULL_RTX above.


-- 
Eric Botcazou


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