This is the mail archive of the 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/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.

Gimple needs a text form that can be manually or automatically generated. This form needs to represent the complete state of the IL needed to continue codegen/analysis/optimization.

Ideally, one would be able to generate gimple at any arbitrary point in the compilation pipeline, and also inject gimple at any arbitrary point. This way, we can generate tests that exercise exactly one pass in the compiler (which means, it should be able to execute exactly one analysis or transformation pass, but that's another issue).

Whether the debug dumpers end up using the gimple generation routines is another question. I think in the long term, it will make sense to have the debug dumpers generate output in the same syntax expected by the gimple parser, however.


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