As of August 2008, the tuples branch has been incorporated into mainline. This code will be released with GCC 4.4.
This is a new internal representation for GIMPLE. It is is a tuple-like representation instead of the current notion of treating everything as a 'tree'. So tree-s are front-end representations, and tuples (i.e. gimple-s in the C code) are the middle-end representation (different from tree-s). Middle-end passes are handling gimple tuples. Some internal fields inside gimple tuples are tree-s. Discussions on the proposed approach can be found here:
The tuple branch has just been merged (July, 27-28th, 2008) into GCC trunk (rev.138207).
This document describes the proposed design. All the work is being done on the SVN branch gimple-tuples-branch. The document is still under construction and will change as the API evolves.
Branch status (updated 2008-07-16)
- The branch bootstraps with all primary languages.
- Major missing functionality includes:
One unconverted pass (pass_ipa_matrix_reorg).
Preliminary memory and compile-time testing show promising results: http://gcc.gnu.org/ml/gcc-patches/2008-06/msg00353.html.
To build the branch:
$ cd <bld> $ <src>/configure $ make
When submitting patches, please make sure that your patch bootstrap as above and you do not have new regressions against the failures in the base branch.
- Convert disabled passes.
No regressions in make check w.r.t trunk.
Convert primary platforms
Convert secondary platforms
- Convert secondary languages
Cleanups and other TODOs
Add as needed and claim the ones you are working on
Remove fallback in gimplify_expr and figure it out from the predicate
Whenever possible, convert buildN/gimplify_and_add calls into build_gimple_*/gimple_add, to avoid the overhead of calling the gimplifier unnecessarily.
- Make the sequences a flat array instead of a double-linked list. Use some dynamic array representation that supports insertion/removal in the middle efficiently.
Fix all the FIXME tuples in the code
- Stop the gimplifier from modifying the input tree. Currently, rewriting the input is used when the caller wants a GIMPLE operand to be returned. It is also used during gimplification by the helper functions to simplify the input tree as they go. If we didn't need this, we could do away with the need to unshare all the trees when gimplifying full functions.
Replace fold_defer_overflow_warnings/fold_undefer_overflow_warnings with a tagging scheme. When fold() returns a result that has overflown, tag the result and emit the warning only when the result is put back into the IL.
Move most of the folding code in tree-ssa-ccp.c into gimple-fold.c.
- Convert builtin expanders to run on gimple tuples prior to conversion to trees, or otherwise eliminate their callbacks into the tuples world.
Modify GIMPLE_CALL builders to pass the LHS of the call to gimple_build_call_*.