From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16707 invoked by alias); 20 Sep 2004 17:47:34 -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 16700 invoked from network); 20 Sep 2004 17:47:33 -0000 Received: from unknown (HELO mx2.redhat.com) (66.187.237.31) by sourceware.org with SMTP; 20 Sep 2004 17:47:33 -0000 Received: from int-mx2.corp.redhat.com (int-mx2.corp.redhat.com [172.16.27.26]) by mx2.redhat.com (8.12.11/8.12.10) with ESMTP id i8KHkUtF009068; Mon, 20 Sep 2004 13:46:31 -0400 Received: from potter.sfbay.redhat.com (potter.sfbay.redhat.com [172.16.27.15]) by int-mx2.corp.redhat.com (8.11.6/8.11.6) with ESMTP id i8KHlU720393; Mon, 20 Sep 2004 13:47:30 -0400 Received: from [192.168.123.106] (vpn50-58.rdu.redhat.com [172.16.50.58]) by potter.sfbay.redhat.com (8.11.6/8.11.6) with ESMTP id i8KHlTV05054; Mon, 20 Sep 2004 10:47:29 -0700 Subject: Re: Difference between {expand,fold,simplify}_builtin_foo ??? From: Eric Christopher To: "Kaveh R. Ghazi" Cc: gcc@gcc.gnu.org In-Reply-To: <200409201741.i8KHfi9u009853@caip.rutgers.edu> References: <200409201741.i8KHfi9u009853@caip.rutgers.edu> Content-Type: text/plain Message-Id: <1095702447.2934.18.camel@localhost.localdomain> Mime-Version: 1.0 Date: Mon, 20 Sep 2004 18:38:00 -0000 Content-Transfer-Encoding: 7bit X-SW-Source: 2004-09/txt/msg01177.txt.bz2 On Mon, 2004-09-20 at 10:41, Kaveh R. Ghazi wrote: > I've been out of GCC most of the summer, so I don't know if this was > discussed or not. I was wondering what's the reason for and > difference between {expand,fold,simplify}_builtin_foo(). > > Looking at e.g. expand_builtin_sprintf and simplify_builtin_sprintf, > they seem to do exactly the same transformations. Can we just have > expand_builtin_sprintf call simplify_builtin_sprintf and then expand > the result? This would remove lots of code duplication and potential > locations of errors. I've got a patch in the works that removes most of the simplify_* routines. Some of them I've uh... folded... into fold_* and others I'm doing what you said here. :) I'll probably get back to it later today :) -eric -- Eric Christopher