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: [trunk] first patch to remove libcalls.


> This patch is the first in a series of patches by stevenb and myself to
> remove libcalls from the back end.    This patch removes on particularly
> large case end to end, the REG_NO_CONFLICT blocks.   Later patches will
> remove code that generates other types of libcalls.

The prerequisite is patch #3 of your 04/21 series, right?

> There is a real possibility that this patch will cause performance
> regressions on platforms with smaller words sizes.  These platforms
> should be tested with this patch and any performance regressions added
> explicitly to pr35404.  If these performance regressions exist, they
> will be addressed by vlad with his new allocator.   Any correctness
> regressions, (asside from possibly failures to allocate registers)
> should be addressed by separate prs that are directed to stevenb and
> myself.

This sounds reasonable to me, assuming the case in PR rtl-optimization/35404 
is addressed first, but I don't have the authority to approve it (entirely).

> 2008-04-27  Kenneth Zadeck <zadeck@naturalbridge.com>
>
>     * doc/rtl.texi: Removed reference to REG_NO_CONFLICT notes.
>     * optabs.c (expand_binop, expand_absneg_bit, expand_unop,
>     expand_copysign_bit, ): Change call to emit_no_conflict_block to
>     emit_insn and remove unneeded code to construct extra args.
>     (emit_no_conflict_block): Removed.
>     * optabls.h: (emit_no_conflict_block): Removed.
>     * cse.c (cse_extended_basic_block): Remove search for
>     REG_NO_CONFLICT note.
>     * global.c: Removed incorrect comment added in revision 117.
>     * expr.c (convert_move): Change call to emit_no_conflict_block to
>     emit_insn.
>     * recog.c: Change comments so that they do not mention
>     REG_NO_CONFLICT.
>     * local_alloc.c (combine_regs): Removed last parameter.
>     (no_conflict_p): Removed.
>     (block_alloc): Removed note, no_conflict_combined_regno and set
>     local vars. Removed all code to process REG_NO_CONFLICT blocks.
>     (combine_regs): Removed already_dead and code to look for
>     REG_NO_CONFLICT notes.
>     * lower_subreg (remove_retval_note): Removed code to look for
>     REG_NO_CONFLICT block.
>     (resolve_reg_notes): Removed REG_NO_CONFLICT case.
>     (resolve_clobber): Remove code to process libcalls that have
>     REG_NO_CONFLICT notes.
>     * loop_invariant.c (find_invariant_insn): Removed REG_NO_CONFLICT
>     case.
>     * combine.c (can_combine_p, distribute_notes):  Removed REG_NO_CONFLICT
>     case.
>     * config/cris/cris.md (movdi pattern): Changed
>     emit_no_conflict_block to emit_insns.
>     * config/mn10300/mn10300.md (absdf2, negdf2 patterns): Ditto.
>     * config/m68k/m68k.md (negdf2, negxf2, absdf2, absxf2 patterns):
>     Ditto.
>     * reg-notes.def (NO_CONFLICT): Removed.

Looks technically OK, modulo the following nits:

@@ -1151,8 +1151,7 @@ expand_doubleword_shift (enum machine_mo
 
    If we want to multiply two two-word values and have normal and widening
    multiplies of single-word values, we can do this with three smaller
-   multiplications.  Note that we do not make a REG_NO_CONFLICT block here
-   because we are not operating on one word at a time.
+   multiplications.  
 
Trailing spaces.

@@ -3777,10 +3767,10 @@ struct no_conflict_data
   bool must_stay;
 };
 
-/* Called via note_stores by emit_no_conflict_block and emit_libcall_block.
-   Set P->must_stay if the currently examined clobber / store has to stay
-   in the list of insns that constitute the actual no_conflict block /
-   libcall block.  */
+/* Called via note_stores by emit_libcall_block.  Set P->must_stay if
+   the currently examined clobber / store has to stay in the list of
+   insns that constitute the actual no_conflict block / libcall
+   block.  */

Comment not fully updated.

@@ -1504,16 +1452,10 @@ block_alloc (int b)
 	      combined_regno = REGNO (r1);
 	    }
 
-	  /* Mark the death of everything that dies in this instruction,
-	     except for anything that was just combined.  */
-

Why remove the comment?

@@ -2017,7 +1942,7 @@ combine_regs (rtx usedreg, rtx setreg, i
      if this is the last use of UREG, provided the classes they want
      are compatible.  */
 
-  if ((already_dead || find_regno_note (insn, REG_DEAD, ureg))
+  if ((find_regno_note (insn, REG_DEAD, ureg))
       && reg_meets_class_p (sreg, qty[reg_qty[ureg]].min_class))
     {
       /* Add SREG to UREG's quantity.  */

Superfluous parentheses.

-- 
Eric Botcazou


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