From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24963 invoked by alias); 28 Jul 2005 21:02:39 -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 24947 invoked by uid 22791); 28 Jul 2005 21:02:30 -0000 Received: from zproxy.gmail.com (HELO zproxy.gmail.com) (64.233.162.200) by sourceware.org (qpsmtpd/0.30-dev) with ESMTP; Thu, 28 Jul 2005 21:02:30 +0000 Received: by zproxy.gmail.com with SMTP id n1so319355nzf for ; Thu, 28 Jul 2005 14:02:29 -0700 (PDT) Received: by 10.36.49.10 with SMTP id w10mr2061667nzw; Thu, 28 Jul 2005 14:01:57 -0700 (PDT) Received: by 10.36.115.18 with HTTP; Thu, 28 Jul 2005 14:01:56 -0700 (PDT) Message-ID: <7326d8e405072814012a5c9aab@mail.gmail.com> Date: Thu, 28 Jul 2005 21:02:00 -0000 From: drizzle drizzle Reply-To: drizzle drizzle To: Diego Novillo Subject: Re: Insertng a call function Cc: gcc@gcc.gnu.org In-Reply-To: <20050728181557.GA6630@topo.toronto.redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline References: <7326d8e4050728101594b67c1@mail.gmail.com> <20050728181557.GA6630@topo.toronto.redhat.com> X-SW-Source: 2005-07/txt/msg01193.txt.bz2 Hi=20 I updated my function call creating statement based on how gomp_parallel_end is inserted in the gomp branch. It still breaks. I have provided the function declaration in the file, just want to insert the call. Any further suggestions. My whole objective is to mark a few particular tree statements (array references actually) and carry them over to RTL form. So I am trying to insert a call before these references which when seen in RTL will tell me my references of interest. Any suggestions on some other ways I an try apart from this call insertion? here is my upated piece of code to insert a function call=20 tree fn, type; type =3D build_function_type_list (void_type_node, void_type_node, NULL_= TREE); tree id =3D get_identifier ("foo"); tree fn_decl =3D build_decl (FUNCTION_DECL, id, type); DECL_EXTERNAL (fn_decl) =3D 1; TREE_PUBLIC (fn_decl) =3D 1; DECL_ARTIFICIAL (fn_decl) =3D 1; TREE_NOTHROW (fn_decl) =3D 1; tree call=3Dbuild_function_call_expr (fn_decl, NULL_TREE); thanks=20 On 7/28/05, Diego Novillo wrote: > On Thu, Jul 28, 2005 at 01:15:22PM -0400, drizzle drizzle wrote: >=20 > > I am inserting a call stmt in linear_transform_loops. Al though > > the call statement gets inserted , the compilation breaks. Can some > > one help me identify if I am missing some information in the call > > node that I create (thanks Daniel for all the help until now) > > > Check gomp-20050608-branch. gimple-low.c:create_gomp_fn takes a > block of code, puts it inside a new function F and replaces the > block of code with a call to F. >