From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 94911 invoked by alias); 13 Oct 2015 13:57:41 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 94828 invoked by uid 48); 13 Oct 2015 13:57:31 -0000 From: "vries at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/67955] New: tree-dse does not use pointer info Date: Tue, 13 Oct 2015 13:57:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: tree-optimization X-Bugzilla-Version: 6.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: enhancement X-Bugzilla-Who: vries at gcc dot gnu.org X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter target_milestone Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2015-10/txt/msg01019.txt.bz2 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67955 Bug ID: 67955 Summary: tree-dse does not use pointer info Product: gcc Version: 6.0 Status: UNCONFIRMED Severity: enhancement Priority: P3 Component: tree-optimization Assignee: unassigned at gcc dot gnu.org Reporter: vries at gcc dot gnu.org Target Milestone: --- Consider this testcase, with dead store '*p = 1': ... int f () { int a; int *p = &a; *p = 1; a = 2; return a; } ... We compile with -O2 -fno-tree-ccp -fno-tree-forwprop -fno-tree-fre. At dse1 we have ... f () { int * p; int a; int _5; : p_1 = &a; *p_1 = 1; a = 2; _5 = a; a ={v} {CLOBBER}; return _5; } ... So, the dead store '*p_1 = 1' has not been eliminated. However, at ealias we already know: ... Alias information for f Aliased symbols a, UID D.1757, int, is addressable Call clobber information ESCAPED, points-to non-local, points-to vars: { } Flow-insensitive points-to information p_1, points-to vars: { D.1757 } ... So, we could use points-to info in dce.