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: regrename speedup


> Ah.  That looks a little buggy actually in the old version.  Nevermind,
> here's a new set of patches.

Thanks.  rr-cleanup2.diff is OK for mainline modulo the following nits:

+/* Undoes the substitution performed by hide_operands.  INSN is the insn we
+   are processing; the arguments are the same as in hide_operands.  */

"Undo the"


+/* For each output operands of INSN, call scan_rtx to create a new
+   open chain.  */

"operand of"


+      struct du_head *prev_open = open_chains;
+
+      if (recog_data.operand_type[opn] == OP_OUT)
+	scan_rtx (insn, loc, cl, mark_write, OP_OUT);
+
+      /* ??? Many targets have output constraints on the SET_DEST
+	 of a call insn, which is stupid, since these are certainly
+	 ABI defined hard registers.  For these, and for asm operands
+	 that originally referenced hard registers, we must record that
+	 the chain cannot be renamed.  */
+      if (CALL_P (insn)
+	  || (asm_noperands (PATTERN (insn)) > 0
+	      && REG_P (op)
+	      && REGNO (op) == ORIGINAL_REGNO (op)))
+	{
+	  if (prev_open != open_chains)
+	    open_chains->first->cl = NO_REGS;
+	}

I'd rewrite it as

      struct du_head *prev_open;

      if (recog_data.operand_type[opn] != OP_OUT)
        continue;

      prev_open = open_chains;
      scan_rtx (insn, loc, cl, mark_write, OP_OUT);

to make things clearer.


I'll look into rr-full2.diff later today.

-- 
Eric Botcazou


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