This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Using add_stmt in gimplify.c
- From: Ian Lance Taylor <iant at google dot com>
- To: Robert Stevenson <robert_steve82 at yahoo dot com>
- Cc: gcc at gnu dot org
- Date: Wed, 15 Dec 2010 20:19:44 -0800
- Subject: Re: Using add_stmt in gimplify.c
- References: <459983.53216.qm@web121706.mail.ne1.yahoo.com>
Robert Stevenson <robert_steve82@yahoo.com> writes:
> I am trying to add some information/instructions into loop statements in
> GCC front-end. For this, in the previous gcc, I have used "add_stmt" to insert
> these instructions and they worked fine. When I do it in gcc 4.6 (snapshot
> 2010/12/4) I get "undefined references to "add_stmt."
>
> One thing I found different in this 4.6 version of gcc is that the files
> prefixed with "c-" have been stored in the c-family director. Is this the reason
> why I am not able to use add_stmt in the gimplify.c function? What can I do to
> use "add_stmt" function?
add_stmt is still there in the C and C++ frontends; I don't know why it
doesn't work for you. But you shouldn't really call it from gimplify.c
anyhow, as add_stmt adds statements to the wrong place. In gimplify.c
you should use functions like gimplify_seq_add_stmt. There are many
examples in that file.
Ian