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'. Discussions on the proposed approach can be found here:

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.

Building the branch (updated 2008-05-05)

The branch bootstraps with all primary languages. The major missing functionality includes:

To build the branch:

$ cd <bld>
$ <src>/configure --disable-libgomp --disable-libmudflap
$ 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. [done] Gimplify libgcc

  2. [done] Gimplify all of compile.exp

  3. [done] Gimplify all the testsuites for C.

  4. [done] Generate RTL from tuples

    • [done] Generate low GIMPLE

    • [done] Build the CFG

    • [done] Re-write RTL expander

  5. Convert disabled passes.
    • [done] pass_apply_inline

    • [done] pass_ccp and folding interface

    • [done] pass_cd_dce

    • [done] pass_ch

    • pass_check_data_deps

    • [done] pass_cleanup_cfg_post_optimizing

    • pass_complete_unroll

    • [done]pass_convert_to_rsqrt

    • [done] pass_copy_prop

    • [done] pass_create_structure_vars

    • [done] pass_cse_reciprocals

    • [done] pass_cse_sincos

    • [done] pass_cselim

    • [done] pass_dce

    • [done] pass_dce_loop

    • [done] pass_del_ssa

    • [done] pass_dominator

    • [done] pass_dse

    • [done] pass_early_inline

    • [done] pass_early_warn_uninitialized

    • pass_empty_loop

    • [aldyh] pass_expand_omp_ssa

    • [done] pass_fold_builtins

    • [dnovillo] pass_forwprop

    • pass_fre

    • [done] pass_free_cfg_annotations

    • [done] pass_free_datastructures

    • [done] pass_inline_parameters

    • [done] pass_ipa_function_and_variable_visibility

    • [done] pass_ipa_early_inline

    • pass_if_conversion

    • pass_ipa_cp

    • pass_ipa_increase_alignment

    • [done] pass_ipa_inline

    • pass_ipa_matrix_reorg

    • pass_ipa_pta

    • [done]pass_ipa_pure_const

    • [done]pass_ipa_reference

    • pass_ipa_struct_reorg

    • pass_ipa_type_escape

    • pass_iv_canon

    • [done] pass_iv_optimize

    • pass_late_warn_uninitialized

    • [done] pass_lim

    • pass_linear_transform

    • [done] pass_loop_prefetch

    • [done] pass_lower_eh

    • [done] pass_lower_vector

    • [done] pass_lower_vector_ssa

    • [done] pass_mark_used_blocks

    • pass_merge_phi

    • [done] pass_nrv

    • [done] pass_object_sizes

    • pass_parallelize_loops

    • [done]pass_phi_only_cprop

    • [done]pass_phiopt

    • [done]pass_phiprop

    • pass_pre

    • [done] pass_predcom

    • pass_reassoc

    • [done] pass_rebuild_cgraph_edges

    • pass_record_bounds

    • [dnovillo] pass_refactor_eh

    • pass_release_ssa_names

    • [done] pass_remove_useless_stmts

    • [done] pass_rename_ssa_copies

    • [done] pass_return_slot

    • [done] pass_scev_cprop

    • [done] pass_simple_dse

    • [done] pass_sink_code

    • [done] pass_split_crit_edges

    • [done] pass_sra

    • [done] pass_sra_early

    • pass_stdarg

    • [done] pass_store_ccp

    • [done] pass_tail_calls

    • [done] pass_tail_recursion

    • pass_tree_ifcombine

    • [rakdver] pass_tree_loop

    • [rakdver] pass_tree_loop_done

    • [rakdver] pass_tree_loop_init

    • [done] pass_tree_profile

    • pass_tree_unswitch

    • pass_uncprop

    • pass_vectorize

    • [done] pass_vrp

    • [done] pass_warn_function_return

  6. [done] Go through execute.exp successfully

  7. [done] Go through check-gcc

  8. [done] Bootstrap with --enable-languages=c

  9. Convert other primary FEs
    • [done] Fortran

    • [done] C++

    • [done] Java

  10. Go through make all check with bootstrap disabled and all languages enabled

  11. Bootstrap with all default languages
  12. Convert primary platforms

    • arm-eabi
    • i386-unknown-freebsd
    • i686-pc-linux-gnu
    • i686-apple-darwin
    • mipsisa64-elf
    • powerpc64-unknown-linux-gnu
    • sparc-sun-solaris2.10
    • x86_64-unknown-linux-gnu
  13. Convert mudflap
  14. [aldyh] Convert OpenMP

  15. Convert secondary platforms

    • hppa2.0w-hp-hpux11.11
    • powerpc-ibm-aix5.2.0.0
    • powerpc-apple-darwin
    • i686-pc-cygwin
    • i686-mingw32
    • ia64-unknown-linux-gnu
    • s390-linux-gnu
  16. Convert secondary languages
    • Ada
    • [done] Objective-C

    • [done] Objective-C++

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. Force every gimplification helper to return with the expression completely gimplified
  3. Whenever possible, convert buildN/gimplify_and_add calls into build_gimple_*/gimple_add, to avoid the overhead of calling the gimplifier unnecessarily.

  4. [done] TREE_SIDE_EFFECTS is important for GS_CALL. pure/const/etc attributes must be mapped

  5. Document all arguments in gimplify_*

  6. Remove GIMPLE_MODIFY_STMT

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

  9. Convert all the GIMPLE routines in all targets
  10. [done] Remove all warnings

  11. 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.
  12. Further factorize the gimple_statement_* structures. Every tuple with operands should have the same gimple_statement_with_operands base (e.g. all the OpenMP tuples, GIMPLE_TRY, GIMPLE_CATCH, etc)
  13. [done] Remove block_stmt_iterators. See note in tree-flow-inline.h.

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

  15. [dnovillo/aldyh] Document new GIMPLE API.

  16. [done] Remove field works_with_tuples_p from struct tree_opt_pass.

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

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

None: tuples (last edited 2008-05-06 00:59:39 by DiegoNovillo)