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: Question about Gimple FE


On 04/03/2015 07:45 AM, Diego Novillo wrote:


On 04/02/15 11:59, xue yinsong wrote:
I suppose our goal is to translate the dumped program back to
the C source code (otherwise we can simply retain the gotos and
labels since they are already `validâ in C). In this case we have to
convert the gotos back to if-elses and whiles. As long as
CFG informations are given, itâs possible to get rid of these gotos.

Not quite. The output of the debug dumpers is not really meant to be fed
back to the compiler. They are debug dumps only. They do not contain
enough information for code generation or analysis.
But that's something that could be fixed.

I think the fundamental question is whether or not to start with the debug dumps or from scratch with a new format. Either way we want a format that is easily readable back into the compiler, but also easily modifable by a human or a preprocessor for test generation.


What's also interesting here is David's work which is a step towards allowing a program to generate gimple and inject it into the compiler at interesting points. So we could have a generator program which generates gimple, feeds it into a pass, then verifies the result. What I'm struggling with here is balancing the human cost of building a test in David's kind of framework vs doing something easier in a gimple-FE like framework vs what we do now where it's bloody hard to arrange for bits to get to a specific pass in a specific state.

jeff


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