From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 30577 invoked by alias); 25 Jun 2014 14:07:41 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 30558 invoked by uid 89); 25 Jun 2014 14:07:39 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-3.3 required=5.0 tests=AWL,BAYES_00,T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 X-HELO: mx2.suse.de Received: from cantor2.suse.de (HELO mx2.suse.de) (195.135.220.15) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (CAMELLIA256-SHA encrypted) ESMTPS; Wed, 25 Jun 2014 14:07:37 +0000 Received: from relay1.suse.de (charybdis-ext.suse.de [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id DAB47AD56; Wed, 25 Jun 2014 14:07:34 +0000 (UTC) Date: Wed, 25 Jun 2014 14:07:00 -0000 From: Richard Biener To: gcc-patches@gcc.gnu.org cc: law@redhat.com Subject: [PATCH] Fix parts of PR61607 Message-ID: User-Agent: Alpine 2.11 (LSU 23 2013-08-11) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-SW-Source: 2014-06/txt/msg02016.txt.bz2 This removes restrictions in DOM cprop_operand that inhibit some optimizations. The volatile pointer thing is really realy old and no longer necessary while the loop-depth consideration is only valid for loop-closed PHI nodes (but we're not in loop-closed SSA in DOM) - the coalescing is handled in out-of-SSA phase by inserting copies appropriately. Bootstrapped on x86_64-unknown-linux-gnu, ok? Thanks, Richard. 2014-06-25 Richard Biener PR tree-optimization/61607 * tree-ssa-dom.c (cprop_operand): Remove restriction on propagating volatile pointers and on loop depth. Index: gcc/tree-ssa-dom.c =================================================================== --- gcc/tree-ssa-dom.c (revision 211969) +++ gcc/tree-ssa-dom.c (working copy) @@ -2247,22 +2247,6 @@ cprop_operand (gimple stmt, use_operand_ if (!may_propagate_copy (op, val)) return; - /* Do not propagate addresses that point to volatiles into memory - stmts without volatile operands. */ - if (POINTER_TYPE_P (TREE_TYPE (val)) - && TYPE_VOLATILE (TREE_TYPE (TREE_TYPE (val))) - && gimple_has_mem_ops (stmt) - && !gimple_has_volatile_ops (stmt)) - return; - - /* Do not propagate copies if the propagated value is at a deeper loop - depth than the propagatee. Otherwise, this may move loop variant - variables outside of their loops and prevent coalescing - opportunities. If the value was loop invariant, it will be hoisted - by LICM and exposed for copy propagation. */ - if (loop_depth_of_name (val) > loop_depth_of_name (op)) - return; - /* Do not propagate copies into simple IV increment statements. See PR23821 for how this can disturb IV analysis. */ if (TREE_CODE (val) != INTEGER_CST