From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24946 invoked by alias); 5 Jan 2010 22:11:17 -0000 Received: (qmail 24888 invoked by uid 48); 5 Jan 2010 22:11:02 -0000 Date: Tue, 05 Jan 2010 22:11:00 -0000 Message-ID: <20100105221102.24887.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug rtl-optimization/42621] [4.4/4.5 Regression] Computed gotos on AMD 800% slower In-Reply-To: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "steven at gcc dot gnu dot org" Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2010-01/txt/msg00583.txt.bz2 ------- Comment #4 from steven at gcc dot gnu dot org 2010-01-05 22:11 ------- I would just go back to the old status (of GCC 4.3 and earlier) than deciding for each basic block individually whether to unfactor or not. Could you please see if the attached problem makes the slow-down disappear? Index: bb-reorder.c =================================================================== --- bb-reorder.c (revision 155661) +++ bb-reorder.c (working copy) @@ -1981,7 +1981,9 @@ gate_duplicate_computed_gotos (void) { if (targetm.cannot_modify_jumps_p ()) return false; - return (optimize > 0 && flag_expensive_optimizations); + return (optimize > 0 + && flag_expensive_optimizations + && ! optimize_function_for_size_p (cfun)); } @@ -2072,9 +2074,6 @@ duplicate_computed_gotos (void) || single_pred_p (single_succ (bb))) continue; - if (!optimize_bb_for_size_p (bb)) - continue; - /* The successor block has to be a duplication candidate. */ if (!bitmap_bit_p (candidates, single_succ (bb)->index)) continue; -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42621