public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* Using add_stmt in gimplify.c
@ 2010-12-16  1:27 Robert Stevenson
  2010-12-16  4:20 ` Ian Lance Taylor
  0 siblings, 1 reply; 4+ messages in thread
From: Robert Stevenson @ 2010-12-16  1:27 UTC (permalink / raw)
  To: gcc

Hello Everyone,
     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?


    Any form of help is truly appreciated!

I have not subscribed to gcc mailing list, so please copy me when you reply.

Regards,

Bobby.


      

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Using add_stmt in gimplify.c
  2010-12-16  1:27 Using add_stmt in gimplify.c Robert Stevenson
@ 2010-12-16  4:20 ` Ian Lance Taylor
  2010-12-16 16:58   ` Robert Stevenson
  0 siblings, 1 reply; 4+ messages in thread
From: Ian Lance Taylor @ 2010-12-16  4:20 UTC (permalink / raw)
  To: Robert Stevenson; +Cc: gcc

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Using add_stmt in gimplify.c
  2010-12-16  4:20 ` Ian Lance Taylor
@ 2010-12-16 16:58   ` Robert Stevenson
  2010-12-17  1:24     ` Ian Lance Taylor
  0 siblings, 1 reply; 4+ messages in thread
From: Robert Stevenson @ 2010-12-16 16:58 UTC (permalink / raw)
  To: gcc

Is there any change I should do to the Makefile.in or any other files? Is there 
any specific header files I should add ? (I have c-family/c-common.h). 


Regards,

Bobby




----- Original Message ----
From: Ian Lance Taylor <iant@google.com>
To: Robert Stevenson <robert_steve82@yahoo.com>
Cc: gcc@gnu.org
Sent: Wed, December 15, 2010 11:19:44 PM
Subject: Re: Using add_stmt in gimplify.c

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



      

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Using add_stmt in gimplify.c
  2010-12-16 16:58   ` Robert Stevenson
@ 2010-12-17  1:24     ` Ian Lance Taylor
  0 siblings, 0 replies; 4+ messages in thread
From: Ian Lance Taylor @ 2010-12-17  1:24 UTC (permalink / raw)
  To: Robert Stevenson; +Cc: gcc

Robert Stevenson <robert_steve82@yahoo.com> writes:

> Is there any change I should do to the Makefile.in or any other files? Is there 
> any specific header files I should add ? (I have c-family/c-common.h). 

We're happy to answer specific questions but it's nearly impossible for
us to answer general questions like the above.  If you want to modify
gcc, you need to be a reasonably skilled C programmer.  If you can't
answer questions like these yourself, or at least narrow them down into
specific questions that you can ask us, then I think you may need to
learn more before you work on modifying gcc.

There is lots and lots of code in gcc which adds instructions to
functions, so there are plenty of examples for you to look at.

Ian

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2010-12-17  1:24 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-12-16  1:27 Using add_stmt in gimplify.c Robert Stevenson
2010-12-16  4:20 ` Ian Lance Taylor
2010-12-16 16:58   ` Robert Stevenson
2010-12-17  1:24     ` Ian Lance Taylor

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).