Dear all,
I would like to have a brief chat in order to understand (roughly) the
way gcc deals with optimization and language-independent function's
representation. I read already some documents (not the gcc internal doc)
and am aware of GENERIC, GIMPLE, tree SSA but I am not confident on
several points:
*) is GIMPLE truely front-end independent (no nore specific hacks)?
*) are all tree SSA optimizations run on individual function's GIMPLE
trees or do some start at GENERIC level?
*) are all front-end designed to pass GENERIC to the middle-end (which
then gimplify) or do some directly provide GIMPLE trees?
*) are the various function's GIMPLE tree the only structure that the
middle-end needs to write back-end code or are there other data that
should be created/obtained from the front-end?
*) is there a tool to browse the gimpled tree of your functions (before
and after some optimizations)?
I rapidly saw an option to dump the generic/gimpled tree to a C form.
(-fdump-generic-tree). Do you think it is theoretically possible to
design "inverse front-end" which would translate the gimple tree to a
selected language (transforming C++ code to C, C99 to C89, fortran95 to
C,...)? An other way of putting this, is: did we loose information or
can a smart tool recover from gimplifying? Are some open source projects
already looking at these aspects?
I am sorry, these are a lot of questions. You can point me to any
forum/mailing list archive or document: I can learn by myself. Are gcc's
internal documentation available somewhere (without installing the gcc
grom source)?
Thank you,
Thomas