As of August 2008, the tuples branch has been incorporated into mainline. This code will be released with GCC 4.4.

GIMPLE Tuples

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).

API Documentation

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)

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.

Plan

  1. Convert disabled passes.
    • [razya] pass_ipa_matrix_reorg

  2. No regressions in make check w.r.t trunk.

  3. Convert primary platforms

    • i386-unknown-freebsd
    • sparc-sun-solaris2.10
  4. Convert secondary platforms

    • hppa2.0w-hp-hpux11.11
    • powerpc-ibm-aix5.2.0.0
    • powerpc-apple-darwin
    • i686-pc-cygwin
    • i686-mingw32
    • s390-linux-gnu
  5. Convert secondary languages
    • Ada

Cleanups and other TODOs

Add as needed and claim the ones you are working on

  1. Remove fallback in gimplify_expr and figure it out from the predicate

  2. Whenever possible, convert buildN/gimplify_and_add calls into build_gimple_*/gimple_add, to avoid the overhead of calling the gimplifier unnecessarily.

  3. 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.
  4. Fix all the FIXME tuples in the code

  5. 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.
  6. 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.

  7. Move most of the folding code in tree-ssa-ccp.c into gimple-fold.c.

  8. Convert builtin expanders to run on gimple tuples prior to conversion to trees, or otherwise eliminate their callbacks into the tuples world.
  9. Modify GIMPLE_CALL builders to pass the LHS of the call to gimple_build_call_*.

None: tuples (last edited 2009-01-29 19:39:25 by DiegoNovillo)