From patchwork Wed Oct 26 09:54:36 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Georg-Johann Lay X-Patchwork-Id: 686962 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 3t3lkQ5s6Hz9sfH for ; Wed, 26 Oct 2016 20:55:09 +1100 (AEDT) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b=tfYRcCkA; dkim-atps=neutral DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:to :from:subject:message-id:date:mime-version:content-type :content-transfer-encoding; q=dns; s=default; b=wJIa+ECOo4p/VTHQ 8/BKBvGvKsb5GmmwOH6Bwh349aimh7RgoOE7UNonmIrhv43I7AkBQlhVob9K6PXF zvpfQM+ha+5fDJ9drGLvglz5yLezBSCV9R2K5AXyaU8UIiTCWmXAPnc1OXCahCbu AWPstnAct7l75KOyyjVawLDGrj8= 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:to :from:subject:message-id:date:mime-version:content-type :content-transfer-encoding; s=default; bh=e65PbsNl95KSQm+gjm+Tad FnshQ=; b=tfYRcCkA539c0cI12OZFhD5m7qcmzfmjgKlWh5kRfySP5zj97fTaou 06/D4GBz++wRliDXnGZ59KUbEebIywmYaRknlLkIEi+5SHNwp6CexwOeKJBp5rcC DhjTpogMIL8wzjw/GSETVyBqxhlYgeMiZ3eojyhKYdwCM20OHoBj4= Received: (qmail 10346 invoked by alias); 26 Oct 2016 09:54:51 -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 10293 invoked by uid 89); 26 Oct 2016 09:54:50 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.1 required=5.0 tests=AWL, BAYES_00, RCVD_IN_DNSWL_LOW, RCVD_IN_SORBS_SPAM autolearn=ham version=3.3.2 spammy=Hx-languages-length:2339, opportunity X-HELO: mo4-p00-ob.smtp.rzone.de Received: from mo4-p00-ob.smtp.rzone.de (HELO mo4-p00-ob.smtp.rzone.de) (81.169.146.162) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 26 Oct 2016 09:54:40 +0000 X-RZG-AUTH: :LXoWVUeid/7A29J/hMvvT3ol15ykJcYwTPLBCxG2PQt7BpWLF2I= X-RZG-CLASS-ID: mo00 Received: from [192.168.0.123] (ip5f5871bb.dynamic.kabel-deutschland.de [95.88.113.187]) by smtp.strato.de (RZmta 39.7 DYNA|AUTH) with ESMTPSA id j01709s9Q9sb9Jb (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA (curve secp521r1 with 521 ECDH bits, eq. 15360 bits RSA)) (Client did not present a certificate) for ; Wed, 26 Oct 2016 11:54:37 +0200 (CEST) To: gcc-patches From: Georg-Johann Lay Subject: [patch,committed] Work around problem in gen-pass-instances.awk Message-ID: Date: Wed, 26 Oct 2016 11:54:36 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.2.0 MIME-Version: 1.0 X-IsSubscribed: yes gen-pass-instances.awk is sensitive to the order in which directives are written down, e.g. in target-pass.def: If a pass that runs first is added first, then the last pass is skipped and not added to pass-instances.def. Work around is to add the 2nd pass before adding the 1st pass... http://gcc.gnu.org/r241547 No so obvious, but committed anyway... Johann gen-pass-instances.awk is sensitive to the order in which passes are added; passes that appear later have to be added first. PR target/71676 PR target/71678 * config/avr/avr-passes.def: Swap order of directives for gen-pass-instances.awk. Index: config/avr/avr-passes.def =================================================================== --- config/avr/avr-passes.def (revision 241546) +++ config/avr/avr-passes.def (revision 241547) @@ -17,6 +17,19 @@ along with GCC; see the file COPYING3. If not see . */ +/* FIXME: We have to add the last pass first, otherwise + gen-pass-instances.awk won't work as expected. */ + +/* This avr-specific pass (re)computes insn notes, in particular REG_DEAD + notes which are used by `avr.c::reg_unused_after' and branch offset + computations. These notes must be correct, i.e. there must be no + dangling REG_DEAD notes; otherwise wrong code might result, cf. PR64331. + + DF needs (correct) CFG, hence right before free_cfg is the last + opportunity to rectify notes. */ + +INSERT_PASS_BEFORE (pass_free_cfg, 1, avr_pass_recompute_notes); + /* casesi uses a SImode switch index which is quite costly as most code will work on HImode or QImode. The following pass runs right after .expand and tries to fix such situations by operating on the original mode. This @@ -27,13 +40,3 @@ insns withaout any insns in between. */ INSERT_PASS_AFTER (pass_expand, 1, avr_pass_casesi); - -/* This avr-specific pass (re)computes insn notes, in particular REG_DEAD - notes which are used by `avr.c::reg_unused_after' and branch offset - computations. These notes must be correct, i.e. there must be no - dangling REG_DEAD notes; otherwise wrong code might result, cf. PR64331. - - DF needs (correct) CFG, hence right before free_cfg is the last - opportunity to rectify notes. */ - -INSERT_PASS_BEFORE (pass_free_cfg, 1, avr_pass_recompute_notes);