From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10037 invoked by alias); 1 Apr 2003 16:11:15 -0000 Mailing-List: contact gcc-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-owner@gcc.gnu.org Received: (qmail 10026 invoked from network); 1 Apr 2003 16:11:14 -0000 Received: from unknown (HELO gauvain.u-strasbg.fr) (130.79.74.5) by sources.redhat.com with SMTP; 1 Apr 2003 16:11:14 -0000 Received: from pop by gauvain.u-strasbg.fr with local (Exim 3.36 #1 (Debian)) id 190OLw-0007Ht-00; Tue, 01 Apr 2003 18:11:12 +0200 Date: Tue, 01 Apr 2003 17:05:00 -0000 To: Jan Hubicka Cc: gcc@gcc.gnu.org Subject: Re: [RFC] CFG hooks for rtl/tree specificities Message-ID: <20030401161112.GD24512@gauvain.u-strasbg.fr> References: <20030401145007.GA25362@gauvain.u-strasbg.fr> <20030401154607.GF904@kam.mff.cuni.cz> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20030401154607.GF904@kam.mff.cuni.cz> User-Agent: Mutt/1.4i From: =?iso-8859-1?Q?Pop_S=E9bastian?= X-SW-Source: 2003-04/txt/msg00036.txt.bz2 On Tue, Apr 01, 2003 at 05:46:07PM +0200, Jan Hubicka wrote: > > This looks nice. > It would be interesting to think about what operations do we really need > - for instance split_edge should be probably implementable already via > the primitive operations (basic block creation, edge redirection). Our Yes, the split_edge function is trivially implemented at the tree level: basic_block tree_split_edge (edge_in) edge edge_in; { basic_block new_bb, dest; /* Abnormal edges cannot be split. */ if (edge_in->flags & EDGE_ABNORMAL) abort (); dest = edge_in->dest; new_bb = create_bb (); redirect_edge_succ (edge_in, new_bb); make_edge (new_bb, dest, EDGE_FALLTHRU); return new_bb; } except "create_bb" all the other functions are CFG generic, making the split_edge a good candidate for the CFG API. At RTL level the split_edge function deals with insns at this moment. > current API is not 100% ready for that so we will probably need cleanup > on the way. > > I would be happy about switching to the hooks first and leaving it to me > to cleanup the APIs if you preffer. > Yes, thanks. Sebastian