|What is a restructuring compiler? firstname.lastname@example.org (2004-10-21)|
|Re: What is a restructuring compiler? email@example.com (2004-10-23)|
|Re: What is a restructuring compiler? firstname.lastname@example.org (2004-10-25)|
|Re: What is a restructuring compiler? email@example.com (2004-10-30)|
|Re: What is a restructuring compiler? firstname.lastname@example.org (Silvius Rus) (2004-10-30)|
|Re: What is a restructuring compiler? email@example.com (A Pietu Pohjalainen) (2004-10-30)|
|Re: What is a restructuring compiler? firstname.lastname@example.org (M Wolfe) (2004-11-29)|
|From:||Silvius Rus <email@example.com>|
|Date:||30 Oct 2004 22:45:46 -0400|
|Organization:||Posted via Supernews, http://www.supernews.com|
|References:||04-10-143 04-10-164 04-10-178|
|Posted-Date:||30 Oct 2004 22:45:46 EDT|
> [...] why would there exist a restructuring compiler by itself?
> [Actually, there are. They rewrite programs to make them more amenable
> to other kinds of optimization. -John]
I would agree with John on this. For instance, you can imagine a
transformation that restructures a program so that the result has a
particular type of control. This lets you and others design or/and
use simpler and stronger analysis techniques based on this assumption.
If the Control Dependence Graph of your restructured program is always
acyclic (self-loops allowed), you are already in much better shape
than having to deal with a general graph. And I mean both you as a
compiler writer and you as a programmer -- since you can now rewrite
the code hierarchically even if it was originally written as a
I use restructuring as a separate precompilation phase to unify
several syntactically different -- though semantically equivalent --
Abstract Syntax Tree constructs. There are many different ways a
programmer can mean the same thing, while the compiler writer wants to
write a single transformation for any one given purpose. If you do
not restructure/unify, you may end up rewriting the transformation for
After all, I think the first C++ compilers worked by lowering it to C.
You can also view this as restructuring the code to a subset of C++
that is understood by C compilers. So you get a restructuring C++
compiler. The restructured code can be compiled by various C
compilers, while the original cannot.
Return to the
Search the comp.compilers archives again.