From patchwork Fri Jun 15 01:38:05 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Easwaran Raman X-Patchwork-Id: 165030 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 8B104B706A for ; Fri, 15 Jun 2012 11:38:23 +1000 (EST) Comment: DKIM? See http://www.dkim.org DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=gcc.gnu.org; s=default; x=1340329104; h=Comment: DomainKey-Signature:Received:Received:Received:Received:Received: MIME-Version:Received:Received:Date:Message-ID:Subject:From:To: Cc:Content-Type:Mailing-List:Precedence:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:Sender:Delivered-To; bh=JAzaW5x VLYrc5wuLa9r2PJCbO2E=; b=dlz/9AFwB//W1o1KYy5/WQzjCdcL7UrX4AW6Vg2 qWzXqppJEjK/ACSHdNk+vDSsq9WBDRRIu+9FUy4WiS5tYWsp35fu2W7BvSwXdHzG C6FL+36YreseN2+syweVmg6zJiFsP7KuTjwo47Sq0zxU1eXBvTVo7ZWoS1QAmbg/ 805c= Comment: DomainKeys? See http://antispam.yahoo.com/domainkeys DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=default; d=gcc.gnu.org; h=Received:Received:X-SWARE-Spam-Status:X-Spam-Check-By:Received:Received:X-Google-DKIM-Signature:Received:MIME-Version:Received:Received:Date:Message-ID:Subject:From:To:Cc:Content-Type:X-System-Of-Record:X-Gm-Message-State:X-IsSubscribed:Mailing-List:Precedence:List-Id:List-Unsubscribe:List-Archive:List-Post:List-Help:Sender:Delivered-To; b=Pbn0AvaVj8tbiVasdCuumeVW9iQNjbob25lcT0nuSSSl8wWKCkZQ8DWkPZmpSq uY+OFESUNX2PSF/++q6ncuyZA9HqPB3ezV6SrpEWZ/0/0vtqvOa85k4Il+NaI80t nhD21nemLa7SYNImetFHtcLuyNlFgS1lIbSgRSgiI6o14=; Received: (qmail 31618 invoked by alias); 15 Jun 2012 01:38:20 -0000 Received: (qmail 31610 invoked by uid 22791); 15 Jun 2012 01:38:19 -0000 X-SWARE-Spam-Status: No, hits=-5.0 required=5.0 tests=AWL, BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, KHOP_RCVD_TRUST, RCVD_IN_DNSWL_LOW, RCVD_IN_HOSTKARMA_YE, T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mail-yw0-f47.google.com (HELO mail-yw0-f47.google.com) (209.85.213.47) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 15 Jun 2012 01:38:06 +0000 Received: by yhjj56 with SMTP id j56so2160524yhj.20 for ; Thu, 14 Jun 2012 18:38:05 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:date:message-id:subject:from:to:cc:content-type :x-system-of-record:x-gm-message-state; bh=8x2/NcnEIZhLbhK/kC8t+jyjosR2Hrarqu94CE+r60g=; b=WSdFyksEuuAjCdEsLZ90OuQTwAGkHmEyBeuOTHzofrsMX6NeM8KBGr/FI1xLbDUaZt 11Rz6YvHOCYjUXIEd8b0NH46QIEU+lpqPCFH5GYqXpVhD6D2PmkNyKFXP73TgA+y12ZE cTjcyTPYbTmSsKcuDwplKipWVlrfIw1i8x8tgd3uXnnzntfIaMmqpC7FDLH8gNUj3f3n umNZKj4gaJ9Z6epuXW1X5Apr0j2ARJzH8dBIBwctp4B8rhOleXllqDeTkYp4CGE0RieX f45QNv5Z3YfpsV3irFOn66pi+jDbeG9dw4+tk7adzyENrSpEGwuCSC+2+h8DWjNqTfto 8k9A== Received: by 10.50.91.233 with SMTP id ch9mr75960igb.8.1339724285304; Thu, 14 Jun 2012 18:38:05 -0700 (PDT) MIME-Version: 1.0 Received: by 10.50.91.233 with SMTP id ch9mr75956igb.8.1339724285203; Thu, 14 Jun 2012 18:38:05 -0700 (PDT) Received: by 10.50.70.68 with HTTP; Thu, 14 Jun 2012 18:38:05 -0700 (PDT) Date: Thu, 14 Jun 2012 18:38:05 -0700 Message-ID: Subject: Change the ordering of cdce pass From: Easwaran Raman To: gcc-patches@gcc.gnu.org Cc: David Li X-System-Of-Record: true X-Gm-Message-State: ALoCoQmu3lCkW5CvtlTN8XqomJhhN8nbKs++Qpsp7zI3kGG0ADExr2IoSlVQKs7R5kHujIWMBuU4sYKX0f+c+X3HgdqA/+nSUHumH2MCknPCIDD1AlJ/5wUx6ZABv9gkTaUwEzyVDrGRyJmqg3CWZfEyqylP4Au6BQ== 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 The conditional dead call elimination pass shrink wraps certain dead calls to math functions. It doesn't handle case like this: D.142420_139 = powD.549 (D.142421_138, D.142419_132); fooD.120935.barD.113815 = D.142420_139; # foo.bar is dead here. This code gets cleaned up by DCE and leaves only pow, which can then be shrink-wrapped by cdce. So it seems reasonable to do this reordering. Bootstraps on x86_64 on linux with no test regression. OK for trunk? - Easwaran ---------------------- 2012-06-14 Easwaran Raman * gcc/passes.c (init_optimization_passes): Remove pass_call_cdce from its current position and insert after pass_dce. Index: gcc/passes.c =================================================================== --- gcc/passes.c (revision 188535) +++ gcc/passes.c (working copy) @@ -1374,7 +1374,6 @@ init_optimization_passes (void) NEXT_PASS (pass_complete_unrolli); NEXT_PASS (pass_ccp); NEXT_PASS (pass_forwprop); - NEXT_PASS (pass_call_cdce); /* pass_build_alias is a dummy pass that ensures that we execute TODO_rebuild_alias at this point. Re-building alias information also rewrites no longer addressed @@ -1387,6 +1386,7 @@ init_optimization_passes (void) NEXT_PASS (pass_merge_phi); NEXT_PASS (pass_vrp); NEXT_PASS (pass_dce); + NEXT_PASS (pass_call_cdce); NEXT_PASS (pass_cselim); NEXT_PASS (pass_tree_ifcombine); NEXT_PASS (pass_phiopt);