This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: code instrumentation in the tree structure
- From: Ian Lance Taylor <iant at google dot com>
- To: BjÃrn Skoglund <skoglund at lysator dot liu dot se>
- Cc: gcc-help at gcc dot gnu dot org
- Date: 05 Sep 2006 08:31:37 -0700
- Subject: Re: code instrumentation in the tree structure
- References: <44FD519C.7040303@lysator.liu.se>
BjÃrn Skoglund <skoglund@lysator.liu.se> writes:
> I don't know if this is a development-list issue but I thought I'd
> start here. I'm writing a code instrumentation tool using the GEM
> plugin-system (http://www.ecsl.cs.sunysb.edu/gem/) as a part of my
> thesis project. I got it working in gcc-3.4 with a little help from
> the GEM maintainer but I have realized I need to move to gcc-4 to get
> access to the control-flow manipulation tools. Now my problem is that
> my code which inserted function call statements does not work under
> the gcc-4
> environment. the EXPR_STMT-symbol is gone for example. which makes the line
>
> >t_new_stmt = build_nt(EXPR_STMT, t_call);
>
> cause compilation errors. Now, has the notion of statements been
> removed in gcc-4, and in that case what has replaced it? I am quite
> confused at the moment so if something doesn't make sense I'd be very
> happy with any kind of explanation that makes me understand again. The
> following piece of code is what I'm working with at the moment. It
> compiles but doesn't really cause anything to happen when run.
gcc4 internals are very different from gcc3 internals. That's why we
bumped the version number. In gcc4, everything is translated into
GIMPLE, a tree based language, and works from there.
There is no need for EXPR_STMT in GIMPLE, so it was moved to the C++
frontend which continues to use it when handling templates.
Ian