From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22143 invoked by alias); 28 Feb 2005 13:47:03 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 22018 invoked by alias); 28 Feb 2005 13:46:44 -0000 Date: Mon, 28 Feb 2005 20:49:00 -0000 Message-ID: <20050228134644.22017.qmail@sourceware.org> From: "joern dot rennecke at st dot com" To: gcc-bugs@gcc.gnu.org In-Reply-To: <20050225161912.20211.amylaar@gcc.gnu.org> References: <20050225161912.20211.amylaar@gcc.gnu.org> Reply-To: gcc-bugzilla@gcc.gnu.org Subject: [Bug rtl-optimization/20211] autoincrement generation is poor X-Bugzilla-Reason: CC X-SW-Source: 2005-02/txt/msg03452.txt.bz2 List-Id: ------- Additional Comments From joern dot rennecke at st dot com 2005-02-28 13:46 ------- Subject: Re: autoincrement generation is poor giovannibajo at libero dot it wrote: >------- Additional Comments From giovannibajo at libero dot it 2005-02-25 18:59 ------- >What is the compile-time impact of this patch on cc-i compilation, the usual >C++ testcases, and SPEC? I am sure this is something worthwile to mention for >a review. > > Sorry, I don't have such numbers at the moment. Note that this optimization is specific to AUTO_INC_DEC targets (in principle it is possible to use it to reduce register pressure on other targets too, but there is also a cost to pay in reduced flexibility for sched2 till you make the scheduler aware of the possible transformations). Note that there is a specific flag to enable or disable this optimization, so for each target this can be tuned by OPTIMIZATION_OPTIONS. I made this switch default-on at -O2 mainly because it makes testing the patch much simpler. For integration, I'm also fine with having it default-off and having only the targets that want it turn it on in OPTIMIZATION_OPTIONS. >And BTW, out of curiosity, does the new pass have to live in regmove.c? > > Not absolutely, but it makes sense insofar as an aspect of this optimization is to avoid register-register moves which are required when you end up with awkward register assignments for the addds, and it is also nice to have sched1 run first. And there is also the issue fo inserting add instructions, which needs infrastructure from regmove to avoid issues with targets that have a flags register that can be clobbered by the new adds. For the c4x, it would make sense to run this pass earlier, as detailed in the 1999 thread. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20211