From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24169 invoked by alias); 1 Apr 2004 19:48:44 -0000 Mailing-List: contact gcc-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-owner@gcc.gnu.org Received: (qmail 24160 invoked from network); 1 Apr 2004 19:48:43 -0000 Received: from unknown (HELO mta6.wss.scd.yahoo.com) (66.218.85.37) by sources.redhat.com with SMTP; 1 Apr 2004 19:48:43 -0000 Received: from specifixinc.com (24.7.123.142) by mta6.wss.scd.yahoo.com (7.0.016) (authenticated as jim@tuliptree.org) id 405C545E00633B3B; Thu, 1 Apr 2004 11:48:42 -0800 Message-ID: <406C721A.9080906@specifixinc.com> Date: Thu, 01 Apr 2004 19:48:00 -0000 From: Jim Wilson User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.0.2) Gecko/20030716 MIME-Version: 1.0 To: xyzzy@hotpop.com CC: gcc@gcc.gnu.org Subject: Re: Backend port: Minimizing register usage in favor of memory accesses References: <200403301148.19194.xyzzy@hotpop.com> <4069D937.9000507@specifixinc.com> <200403311111.08108.xyzzy@hotpop.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2004-04/txt/msg00028.txt.bz2 xyzzy@hotpop.com wrote: > Can you point me in the right place to look in the i386 target so I don't mess > this up? Is what Joem said about "lowering MEMORY_MOVE_COST" the only thing > to do? Is there other black magic involved? If your target has patterns that allow MEMs, then gcc will use them. Since some gcc optimizations (like combine) try to reduce the total number of instructions, you will naturally get code that uses MEM in preference to REG. You shouldn't really need to do anything else to get started. There are other things that you can do to fine tune the result and address specific problems, such as setting MEMORY_MOVE_COST. However, since you haven't reported any specific problems, I can't offer any specific suggestions. -- Jim Wilson, GNU Tools Support, http://www.SpecifixInc.com