gccint: Gimplification pass

1 
1 9.2 Gimplification pass
1 =======================
1 
1 "Gimplification" is a whimsical term for the process of converting the
1 intermediate representation of a function into the GIMPLE language
1 (⇒GIMPLE).  The term stuck, and so words like "gimplification",
1 "gimplify", "gimplifier" and the like are sprinkled throughout this
1 section of code.
1 
1  While a front end may certainly choose to generate GIMPLE directly if
1 it chooses, this can be a moderately complex process unless the
1 intermediate language used by the front end is already fairly simple.
1 Usually it is easier to generate GENERIC trees plus extensions and let
1 the language-independent gimplifier do most of the work.
1 
1  The main entry point to this pass is 'gimplify_function_tree' located
1 in 'gimplify.c'.  From here we process the entire function gimplifying
1 each statement in turn.  The main workhorse for this pass is
1 'gimplify_expr'.  Approximately everything passes through here at least
1 once, and it is from here that we invoke the 'lang_hooks.gimplify_expr'
1 callback.
1 
1  The callback should examine the expression in question and return
1 'GS_UNHANDLED' if the expression is not a language specific construct
1 that requires attention.  Otherwise it should alter the expression in
1 some way to such that forward progress is made toward producing valid
1 GIMPLE.  If the callback is certain that the transformation is complete
1 and the expression is valid GIMPLE, it should return 'GS_ALL_DONE'.
1 Otherwise it should return 'GS_OK', which will cause the expression to
1 be processed again.  If the callback encounters an error during the
1 transformation (because the front end is relying on the gimplification
1 process to finish semantic checks), it should return 'GS_ERROR'.
1