Statically Typed Trees in GCC

Version 1

    The current abstract syntax tree of GCC uses a dynamically typed  über-union for nearly all nodes. The desire for a statically typed tree  design has been raised several times over recent years, but there has  been no concerted effort to implement such a design. We describe the  impacts of the current design, both in implementation and performance  degradation. We present a design for statically typed trees, along with  case studies of part of the conversion. We outline a plan for full  conversion and discuss further improvements that this would enable.