From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25682 invoked by alias); 27 Sep 2005 05:33:14 -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 25579 invoked by uid 48); 27 Sep 2005 05:33:07 -0000 Date: Tue, 27 Sep 2005 05:33:00 -0000 Message-ID: <20050927053307.25578.qmail@sourceware.org> From: "ian at airs dot com" To: gcc-bugs@gcc.gnu.org In-Reply-To: <20040130124106.13931.bonzini@gcc.gnu.org> References: <20040130124106.13931.bonzini@gcc.gnu.org> Reply-To: gcc-bugzilla@gcc.gnu.org Subject: [Bug rtl-optimization/13931] [3.4/4.0/4.1 Regression] combiner much slower on big basic blocks X-Bugzilla-Reason: CC X-SW-Source: 2005-09/txt/msg03167.txt.bz2 List-Id: ------- Additional Comments From ian at airs dot com 2005-09-27 05:33 ------- Eric, your patch which caused the quadratic behaviour is here: http://gcc.gnu.org/ml/gcc-patches/2003-05/msg01358.html I know this is a real long-shot, but do you have any recollection of what problem you were solving? That is, which test case was failing before you checked in your patch? And how was it failing? The failure case looks relatively benign to me--we think that a register lives longer than it really does. To me that old code looks pretty much right--in fact it is one of the suggestions I made in my previous comment. In comment #20 you say there was a comment in the code which indicated that it didn't always do the right thing, and in fact you removed that comment in your patch: - - there are extremely rare cases (see distribute_regnotes) when a - REG_DEAD note is lost But in fact that comment not only was correct but still is correct. In some cases, a REG_DEAD note will be lost, and in those cases the code sets a bit in refresh_blocks and reruns life analysis. Actually, I can see that there is a bug in the original code in some unusual cases. It relies on reg_set_p to see whether the register is set and therefore the REG_DEAD note can be discarded. But really we can only casually remove the REG_DEAD note if the register is completely set, and reg_set_p can return true if the register is partially set. For example, if a STRICT_LOW_PART is used when setting the register, we may wind up losing the REG_DEAD note incorrectly. I think that we can only ignore the register if dead_or_set_p returns true for it. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13931