This is the mail archive of the mailing list for the GCC project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[patch] lno branch merge -- vectorizer patch #1


This patch includes:

1) The vectorizer! including all it's functionality from lno-branch, except
for the support for loop bounds that are unknown, which will be sent later
as a separate patch.
2) Utilities from lno-branch that are used by the vectorizer but haven't
been merged to mainline yet: create_iv, force_gimple_operand and
bsi_insert_on_edge_immediate. These were written by Zdenek Dvorak.

Coming up after this patch:
- Support for unknown loop bound
- Loop peeling to force alignment (yet to be ported from apple-ppc to
- Support for misaligned accesses (yet to be ported from apple-ppc to
lno-branch, replacing builtins with new tree-codes).

The patch below was tested on powerpc-apple-darwin7.0.0 and
It passed bootstrap and 'make -k check' on both platforms.
On powerpc-apple-darwin7.0.0 the vectorizer adds 148 passes, 38 expected
failures, and 2 failures (due to a bug in, not related to
vectorization; a separate fix for that will follow).
On i686-pc-linux-gnu the vectorizer adds 146 passes, 38 expected failures,
and 4 failures (see PR16362).

On powerpc-apple-darwin7.0.0 I tested in addition:
- Bootstrap with vectorization enabled (passed succesflly).
- SPEC with vectorization enabled (passed succesflly, vectorizing 29/16
loops in SPEC fp/int).

Description of the vectorizer and it's current status can be found here: I'm waiting for
approval to commit that too.

The attached patch contains the new files and test-cases, and the diff
against existing files.


Chengelog entry:

2004-07-22  Dorit Naishlos  <>

        * tree-vectorizer.c: New File: loop vectorization on SSAed GIMPLE
        * tree-vectorizer.h: New File: Same.
        * (tree-vectorizer.c, tree-vectorizer.h): Add new
        * common.opt (ftree-vectorize): New flag to enable vectorization.
        * timevar.def (TV_TREE_VECTORIZATION): New dump file for
        * tree-data-ref.h (init_data_ref): Additional argument.
        (array_base_name_differ_p): Moved to tree-data-ref.c.
        * tree-data-ref.c (array_base_name_differ_p): Revised.
        (initialize_data_dependence_relation): Call
        with an extra argument.
        (analyze_all_data_dependences): Same.
        (init_data_ref): Additional argument is_read to set DR_IS_READ.
        * tree-ssa-phiopt.c (empty_block_p): Expose for usage out of this
        * tree-flow.h (vectorize_loops, empty_block_p): Add declaration.
        * tree-optimize.c (pass_vectorize): Schedule the vectorization
        * tree-pass.h (tree_opt_pass pass_vectorize): Declare the new
        vectorization pass.
        * tree-ssa-loop.c (tree_ssa_loop_init): Call scev_initialize.
        (tree_ssa_loop_done): Call scev_finalize.
        (tree_vectorize): Define the new vectorization pass.
        * defaults.h (UNITS_PER_SIMD_WORD): Allow targets to specify the
size of
        the vector they support (until support for multiple vector sizes is
        added to the vectorizer).
        * config/i386/i386.h (UNITS_PER_SIMD_WORD): Define.
        * config/rs6000/rs6000.h (UNITS_PER_SIMD_WORD): Define.
        * invoke.texi (fdump-tree-vect, ftree-vectorize): Add

2004-07-22  Zdenek Dvorak  <>

        * tree-ssa-loop-manip.c: New File.
        (create_iv): New Function.
        * (tree-ssa-loop-manip.c): Add new files.
        * gimplify.c (idx_force_simple, update_addressable_flag): New
        (force_gimple_operand): New function.
        * tree.h (force_gimple_operand): New declaration.
        * tree-cfg.c (tree_find_edge_insert_loc): Additional argument
        (bsi_insert_on_edge_immediate): New function.
        * tree-flow.h (bsi_insert_on_edge_immediate, create_iv): Add

(See attached file: vect_mainline_patch.tar.gz)

Attachment: vect_mainline_patch.tar.gz
Description: Binary data

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]