Inserting a call statement

drizzle drizzle drizzle76@gmail.com
Wed Jul 27 17:39:00 GMT 2005


Thanks for your help. I am attaching my patch. Most of the code dont
modify anything. The code I am talking about is ia small piece in 
tree-data-ref.c in a function insert_annotations. The only
modification in the rest of the code is that an extra variable refid
is set for particular array references. This variable triggers the
annotation. Apart from that my guess is the rest of the code can be
ignored.  I would appreciate any suggestions.

thanks 

On 7/27/05, Daniel Berlin <dberlin@dberlin.org> wrote:
> On Wed, 2005-07-27 at 17:54 +0100, Paul Brook wrote:
> > On Wednesday 27 July 2005 17:33, drizzle drizzle wrote:
> > > Hi
> > >     I am trying to insert a function call "foo" inside the tree list.
> > >
> > >
> > > Inside this particular loop
> > >          for (bsi = bsi_start (bb); !bsi_end_p (bsi); bsi_next (&bsi))
> > >          {
> > >
> > >  //            if a particular condition is satisfied  I do the following
> > >
> > >                 tree id = get_identifier ("foo");
> > >             tree t = build_function_type_list (void_type_node,NULL_TREE);
> > >             tree decl = build_decl (FUNCTION_DECL, id, t);
> > >             tree call = build_function_call_expr (decl, NULL);
> > >              bsi_insert_before(&bsi,call,BSI_CHAIN_END); // I have tried BSI_NEW_STMT
> > >
> > >
> > >           }
> > >
> > >
> > > Although the node is created properly, an assertion in
> > > tree-flow-inline.h fails. Can someone help me identify the issue here.
> > >  i will appreciate that
> >
> > You don't appear to be recording the FUNCTION_DECL anywhere, which probably
> > means cgraph doesn't know about it.
> >
> 
> This is the least of his worries :)
> 
> tree-profile doesn't record it either.
> Most of the tree opts that add function calls don't update the cgraph
> edges right now.
> 
> 
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: patch
Type: application/octet-stream
Size: 41590 bytes
Desc: not available
URL: <https://gcc.gnu.org/pipermail/gcc/attachments/20050727/add6447b/attachment.obj>


More information about the Gcc mailing list