2 msgCommon Tail Elimination
1 msgInstallation failure: `GLIBC_2.3' not found
3 msgmix of sse and x87 code on x86_64
3 msgCreating and using header files
7 msgInconsistent results casting double to int on x86
1 msgconstraints for saving stack pointer
4 msgShared variables (between ELF executables)
3 msgfunction template specialization problem
2 msgConstructors of library objects doesn't get called
1 msgnewbie question: linking problem
1 msgwhere can I find tools info and example steps t...
2 msgmd files language
1 msgfor getting millisecond resolution in profiling...
1 msgBuilding with gcc 2.95 on a gcc 3.x distro

Help in GIMPLE to RTL transformation
\ Amruta G. Gokhale (18 Mar 2006)
. \ Ramana Radhakrishnan (18 Mar 2006)
. . \ Amruta G. Gokhale (18 Mar 2006)
. . . \ Ramana Radhakrishnan (18 Mar 2006)

1 msgGCC 4.1.0 build failure on solaris 2.8
1 msgCan not build gcc-4.0.2
1 msg--program-transform-name option doesn't do anyt...
4 msgefficiency
2 msgUsing a compiler from a program
Subject:Help in GIMPLE to RTL transformation
Group:Gcc-help
From:Amruta G. Gokhale
Date:18 Mar 2006


Hi,

I am looking at some part of GCC source code which does the translation
from GIMPLE to RTL.
I created an example, having two consecutive instructions, one with "div"
and other with "mod".

Example:
int a, b, c, d;
a = b / c;
d = b % c;

The first-cut RTL code corresponding to these two instructions is a
PARALLEL INSN, with two SET INSNs, one with "div" and other with "mod".
(insn 22 21 23 1 (parallel [
(set (reg:SI 70)
(div:SI (reg:SI 72)
(mem/i:SI (plus:SI (reg/f:SI 54 virtual-stack-vars)
(const_int -8 [0xfffffff8])) [0 c+0 S4 A32])))
(set (reg:SI 71)
(mod:SI (reg:SI 72)
(mem/i:SI (plus:SI (reg/f:SI 54 virtual-stack-vars)
(const_int -8 [0xfffffff8])) [0 c+0 S4 A32])))
)

I am unable to understand how a single INSN gets generated for these two
instructions. The GIMPLE code has two different tree nodes for the two
instructions, namely "trunc_div_expr" and "trunc_mod_expr". So there
should be two different INSNs. My guess is, some pass, like "combine",
must be combining two INSNs into one.
I looked at functions in file "combine.c", but no function in that file is
called!

Can anybody suggest something? I am really stuck at this point And can't
proceed any further.

Regards,

Amruta Gokhale
Graduate Student
IIT Bombay,
Mumbai.


© 2004-2008 readlist.com