From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17917 invoked by alias); 20 Oct 2004 17:33:25 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 17879 invoked from network); 20 Oct 2004 17:33:24 -0000 Received: from unknown (HELO mx1.redhat.com) (66.187.233.31) by sourceware.org with SMTP; 20 Oct 2004 17:33:24 -0000 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.12.11/8.12.10) with ESMTP id i9KHXMbT001244; Wed, 20 Oct 2004 13:33:22 -0400 Received: from pobox.toronto.redhat.com (pobox.toronto.redhat.com [172.16.14.4]) by int-mx1.corp.redhat.com (8.11.6/8.11.6) with ESMTP id i9KHXKr29390; Wed, 20 Oct 2004 13:33:20 -0400 Received: from [127.0.0.1] (vpn50-47.rdu.redhat.com [172.16.50.47]) by pobox.toronto.redhat.com (8.12.8/8.12.8) with ESMTP id i9KHXJbU005086; Wed, 20 Oct 2004 13:33:19 -0400 Subject: Re: [PATCH]: Implement must-def kill operand From: Diego Novillo To: Daniel Berlin Cc: "gcc-patches@gcc.gnu.org" , Andrew Macleod In-Reply-To: References: Content-Type: text/plain Organization: Red Hat Canada Message-Id: <1098293613.22552.36.camel@localhost.localdomain> Mime-Version: 1.0 Date: Wed, 20 Oct 2004 17:41:00 -0000 Content-Transfer-Encoding: 7bit X-SW-Source: 2004-10/txt/msg01746.txt.bz2 On Sun, 2004-10-17 at 22:00, Daniel Berlin wrote: > This is a revision of the previous patch, the main change is that it no > longer requires DCE to go into and out of SSA to rename the virtual > must-def operands, as Andrew requested. The renaming it does > in DCE is just the 3rd phase of the regular renamer (rewriting reaching > definitions), > I would rather parameterize the renamer to deal with this situation. Just to make sure I understood the problem and the IRC discussion. Here we have the following situation: # A_4 = V_MUST_DEF 1. A = ...; # A_5 = V_MUST_DEF 2. A = ...; A_4 is dead because no statement uses A_4 (the RHS of a V_MUST_DEF is not a use, it only specifies which version is this V_MUST_DEF killing). Once we remove statement (1), we need to tell statement (2) that it no longer kills A_4, it now kills whichever version was left dominating it (it may or may not be A_3). What we need here is a regular renaming pass, but not all of it. We only need to (a) detect def sites, (b) walk the dominator the dominator tree rewriting the operands of V_MUST_DEFs with CURRENT_DEF. That is, we need to skip the PHI insertion phase. So, I guess this involves a new TODO_* flag (TODO_fix_def_def_chains?) which does (a) and (b) using the existing renamer. The additional logic in the renamer should not slow it down one bit, nor make it more complicated to follow. Diego.