From patchwork Wed Aug 3 15:30:35 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexander Monakov X-Patchwork-Id: 108280 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 855BAB71E2 for ; Thu, 4 Aug 2011 01:31:18 +1000 (EST) Received: (qmail 13000 invoked by alias); 3 Aug 2011 15:31:10 -0000 Received: (qmail 12933 invoked by uid 22791); 3 Aug 2011 15:31:09 -0000 X-SWARE-Spam-Status: No, hits=-2.1 required=5.0 tests=AWL, BAYES_00, RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from smtp.ispras.ru (HELO smtp.ispras.ru) (83.149.198.202) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 03 Aug 2011 15:30:56 +0000 Received: from condor.intra.ispras.ru (winnie.ispras.ru [83.149.198.236]) by smtp.ispras.ru (Postfix) with ESMTP id 61B835D404A; Wed, 3 Aug 2011 19:21:47 +0400 (MSD) Received: by condor.intra.ispras.ru (Postfix, from userid 23246) id 6D2F412207DD; Wed, 3 Aug 2011 19:30:38 +0400 (MSD) From: Alexander Monakov To: gcc-patches@gcc.gnu.org Cc: vmakarov@redhat.com Subject: [PATCH 5/8] Drop an incorrect assert Date: Wed, 3 Aug 2011 19:30:35 +0400 Message-Id: <1312385438-6273-6-git-send-email-amonakov@ispras.ru> In-Reply-To: <1312385438-6273-1-git-send-email-amonakov@ispras.ru> References: <1312385438-6273-1-git-send-email-amonakov@ispras.ru> To: gcc-patches@gcc.gnu.org X-IsSubscribed: yes 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 From: Dmitry Melnik This fixes a bug caused by trying to initialize BB_AV_SET of a newly generated jump. It assumes that jump is only generated in new bb, while it can be replaced in same BB by try_redirect_by_replacing_jump, if jump was conditional and was pointing to the same BB by its both edges (this may happen due to predication, when moving all insns up from a "diamond"). 2011-08-04 Dmitry Melnik * sel-sched-ir.c (invalidate_av_set): Remove the assert. diff --git a/gcc/sel-sched-ir.c b/gcc/sel-sched-ir.c index f22e637..dd8b3da 100644 --- a/gcc/sel-sched-ir.c +++ b/gcc/sel-sched-ir.c @@ -4284,14 +4284,13 @@ free_lv_sets (void) free_lv_set (bb); } -/* Initialize an invalid AV_SET for BB. - This set will be updated next time compute_av () process BB. */ +/* Mark AV_SET for BB as invalid, so this set will be updated the next time + compute_av() processes BB. This function is called when creating new basic + blocks, as well as for blocks (either new or existing) where new jumps are + created when the control flow is being updated. */ static void invalidate_av_set (basic_block bb) { - gcc_assert (BB_AV_LEVEL (bb) <= 0 - && BB_AV_SET (bb) == NULL); - BB_AV_LEVEL (bb) = -1; }