From patchwork Thu Sep 11 13:25:18 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bernd Schmidt X-Patchwork-Id: 388241 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]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id A877E1400A0 for ; Thu, 11 Sep 2014 23:26:21 +1000 (EST) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender :message-id:date:from:mime-version:to:subject:content-type; q= dns; s=default; b=HxPh6HpZ3l7XwO1WEBhfr+uLm7lj+Yfi7uaKu11eFSDmzj nDU1+4/m2io4wQ5npEP/MF2gI7Bwpj45Rf4bOTtc5FQth7KukaYpSxFRfHM8HKki v18+EU9reiMqF+K7oloElutNJ6MVjdVDsxcCyNXqeV3FnAVFpmd1lElezx1X0= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender :message-id:date:from:mime-version:to:subject:content-type; s= default; bh=GPVA2GxPhq688o1TH7BZC+S+FWs=; b=NURXiP+zf+kfxclZ8cQq EAUCnMxLU7mFwAyGeVGEtR4juj8LBMdHIeamCMWUtiCYKsxwEnpOrGcF3FPQH7lE uI4ly1/YYdl74+6xYSQFCZsCbQx+fRe51vHdYbHf6Mn6+6Gq+W42xFpPrqLV4M/x bJFsmOLdLMF2q4lXPiVlPlg= Received: (qmail 28308 invoked by alias); 11 Sep 2014 13:26:14 -0000 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 Received: (qmail 28294 invoked by uid 89); 11 Sep 2014 13:26:14 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.8 required=5.0 tests=AWL, BAYES_00 autolearn=ham version=3.3.2 X-HELO: relay1.mentorg.com Received: from relay1.mentorg.com (HELO relay1.mentorg.com) (192.94.38.131) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 11 Sep 2014 13:26:13 +0000 Received: from nat-ies.mentorg.com ([192.94.31.2] helo=SVR-IES-FEM-04.mgc.mentorg.com) by relay1.mentorg.com with esmtp id 1XS4O2-0006me-8q from Bernd_Schmidt@mentor.com for gcc-patches@gcc.gnu.org; Thu, 11 Sep 2014 06:26:10 -0700 Received: from [127.0.0.1] (137.202.0.76) by SVR-IES-FEM-04.mgc.mentorg.com (137.202.0.110) with Microsoft SMTP Server id 14.3.181.6; Thu, 11 Sep 2014 14:26:08 +0100 Message-ID: <5411A2BE.2000208@codesourcery.com> Date: Thu, 11 Sep 2014 15:25:18 +0200 From: Bernd Schmidt User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.8.0 MIME-Version: 1.0 To: GCC Patches Subject: ptx preliminary rtl patches [2/4] There's some code in get_uncond_jump_length to emit and then delete a label and a jump. On ptx we skip register allocation and reload, and this fails a "reload_completed || bb != NULL" assert in df_insn_delete. Fixed by instead emitting the two insns into a sequence which we then just discard. Bootstrapped and tested on x86_64-linux, together with the other patches. Ok? Bernd * bb-reorder.c (get_uncond_jump_length): Avoid using delete_insn, emit into a sequence instead. diff --git a/gcc/bb-reorder.c b/gcc/bb-reorder.c index b3f770d..789f1e9 100644 --- a/gcc/bb-reorder.c +++ b/gcc/bb-reorder.c @@ -1374,13 +1374,12 @@ get_uncond_jump_length (void) rtx_insn *label, *jump; int length; - label = emit_label_before (gen_label_rtx (), get_insns ()); + start_sequence (); + label = emit_label (gen_label_rtx ()); jump = emit_jump_insn (gen_jump (label)); - length = get_attr_min_length (jump); + end_sequence (); - delete_insn (jump); - delete_insn (label); return length; }