From patchwork Wed Jun 30 02:03:04 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Joern Rennecke X-Patchwork-Id: 57354 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) by ozlabs.org (Postfix) with SMTP id DF2A9B6F18 for ; Wed, 30 Jun 2010 12:03:15 +1000 (EST) Received: (qmail 15314 invoked by alias); 30 Jun 2010 02:03:12 -0000 Received: (qmail 15186 invoked by uid 22791); 30 Jun 2010 02:03:10 -0000 X-SWARE-Spam-Status: No, hits=-2.4 required=5.0 tests=AWL, BAYES_00, MIME_QP_LONG_LINE, RCVD_IN_DNSWL_LOW, TW_EG X-Spam-Check-By: sourceware.org Received: from c60.cesmail.net (HELO c60.cesmail.net) (216.154.195.49) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 30 Jun 2010 02:03:05 +0000 Received: from unknown (HELO delta2) ([192.168.1.50]) by c60.cesmail.net with ESMTP; 29 Jun 2010 22:03:04 -0400 Received: from 78.149.179.58 ([78.149.179.58]) by webmail.spamcop.net (Horde MIME library) with HTTP; Tue, 29 Jun 2010 22:03:04 -0400 Message-ID: <20100629220304.8n84fvtckc00wog8-nzlynne@webmail.spamcop.net> Date: Tue, 29 Jun 2010 22:03:04 -0400 From: Joern Rennecke To: gcc-patches@gcc.gnu.org Subject: RFA: hook signture patches (6/11): TARGET_MEMORY_MOVE_COST MIME-Version: 1.0 User-Agent: Internet Messaging Program (IMP) H3 (4.1.4) Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org 2010-06-29 Joern Rennecke * target.def (memory_move_cost): Use DEFHOOK. * doc/tm.texi.in (TARGET_MEMORY_MOVE_COST): Use @hook. Rename regclass AKA class to rclass. * doc/tm.texi: Regenerate. Index: doc/tm.texi =================================================================== --- doc/tm.texi (revision 161563) +++ doc/tm.texi (working copy) @@ -6170,9 +6170,9 @@ These macros are obsolete, new ports sho @code{TARGET_MEMORY_MOVE_COST} instead. @end defmac -@deftypefn {Target Hook} int TARGET_MEMORY_MOVE_COST (enum machine_mode @var{mode}, enum reg_class @var{regclass}, bool @var{in}) +@deftypefn {Target Hook} int TARGET_MEMORY_MOVE_COST (enum machine_mode @var{mode}, enum reg_class @var{rclass}, bool @var{in}) This target hook should return the cost of moving data of mode @var{mode} -between a register of class @var{class} and memory; @var{in} is @code{false} +between a register of class @var{rclass} and memory; @var{in} is @code{false} if the value is to be written to memory, @code{true} if it is to be read in. This cost is relative to those in @code{TARGET_REGISTER_MOVE_COST}. If moving between registers and memory is more expensive than between two @@ -6181,7 +6181,7 @@ registers, you should add this target ho If you do not add this target hook, GCC uses a default cost of 4 plus the cost of copying via a secondary reload register, if one is needed. If your machine requires a secondary reload register to copy -between memory and a register of @var{class} but the reload mechanism is +between memory and a register of @var{rclass} but the reload mechanism is more complex than copying via an intermediate, use this target hook to reflect the actual cost of the move. Index: doc/tm.texi.in =================================================================== --- doc/tm.texi.in (revision 161563) +++ doc/tm.texi.in (working copy) @@ -6170,9 +6170,9 @@ These macros are obsolete, new ports sho @code{TARGET_MEMORY_MOVE_COST} instead. @end defmac -@deftypefn {Target Hook} int TARGET_MEMORY_MOVE_COST (enum machine_mode @var{mode}, enum reg_class @var{regclass}, bool @var{in}) +@hook TARGET_MEMORY_MOVE_COST This target hook should return the cost of moving data of mode @var{mode} -between a register of class @var{class} and memory; @var{in} is @code{false} +between a register of class @var{rclass} and memory; @var{in} is @code{false} if the value is to be written to memory, @code{true} if it is to be read in. This cost is relative to those in @code{TARGET_REGISTER_MOVE_COST}. If moving between registers and memory is more expensive than between two @@ -6181,7 +6181,7 @@ registers, you should add this target ho If you do not add this target hook, GCC uses a default cost of 4 plus the cost of copying via a secondary reload register, if one is needed. If your machine requires a secondary reload register to copy -between memory and a register of @var{class} but the reload mechanism is +between memory and a register of @var{rclass} but the reload mechanism is more complex than copying via an intermediate, use this target hook to reflect the actual cost of the move. Index: target.def =================================================================== --- target.def (revision 161563) +++ target.def (working copy) @@ -1378,7 +1368,7 @@ DEFHOOK /* Compute cost of moving registers to/from memory. */ /* ??? Documenting the argument types for this hook requires a GFDL license grant. Also, the documentation uses a different name for RCLASS. */ -DEFHOOK_UNDOC +DEFHOOK (memory_move_cost, "", int, (enum machine_mode mode, enum reg_class rclass, bool in),