This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: query about Gcc-backend..


>[1] what is the way [mechanism] the backend of gcc accepts and handles the
>    tree-representation....

Pass a tree to expand_expr, and it emits RTL into the current instruction
stream.  expand_expr is in expr.c.

>[2] how exactly is done "the tree-RTL conversion"...

The md file is required to have certain named patterns which implement the
minimal set of operations from which all other operations can be derived.

For each tree code, there is one or more RTL generation strategies.  The
strategies generally involve calling named patterns in the md file.  If
there is more than one RTL generation strategy, then we use info from the
backend to decide which strategy to use.  This can involve checking to see
which named patterns are defined by this target.  This can involve comparing
relative costs of operations to determine which strategy is cheaper.  Etc.

>[3] how can we understand the broad-view of the routine(s), in the
>    file(s).

There is some info in the internals documentation.  See for instance
        http://gcc.gnu.org/onlinedocs/gccint/Passes.html#Passes
For a better understanding, you just have to spend some time studying the
gcc sources.

Jim


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]