* tree-data-refs.c (split_constant_offset): Expose.
authordorit <dorit@138bc75d-0d04-0410-961f-82ee72b054a4>
Sun, 19 Aug 2007 12:02:48 +0000 (12:02 +0000)
committerdorit <dorit@138bc75d-0d04-0410-961f-82ee72b054a4>
Sun, 19 Aug 2007 12:02:48 +0000 (12:02 +0000)
commitb0eb8c663b1bca6c460b0a6754fd8c49ca018266
tree25bb935b47a86dcee54460eecb1a8c69809ec5da
parent221e9a92bd54d3f572f14697a066205ee80ec187
    * tree-data-refs.c (split_constant_offset): Expose.
        * tree-data-refs.h (split_constant_offset): Add declaration.

        * tree-vectorizer.h (dr_alignment_support): Renamed
        dr_unaligned_software_pipeline to dr_explicit_realign_optimized.
        Added a new value dr_explicit_realign.
        (_stmt_vec_info): Added new fields: dr_base_address, dr_init,
        dr_offset, dr_step, and dr_aligned_to, along with new access
        functions for these fields: STMT_VINFO_DR_BASE_ADDRESS,
        STMT_VINFO_DR_INIT, STMT_VINFO_DR_OFFSET, STMT_VINFO_DR_STEP, and
        STMT_VINFO_DR_ALIGNED_TO.

        * tree-vectorizer.c (vect_supportable_dr_alignment): Add
        documentation.
        In case of outer-loop vectorization with non-fixed misalignment - use
        the dr_explicit_realign scheme instead of the optimized realignment
        scheme.
        (new_stmt_vec_info): Initialize new fields.

        * tree-vect-analyze.c (vect_compute_data_ref_alignment): Handle the
        'nested_in_vect_loop' case. Change verbosity level.
        (vect_analyze_data_ref_access): Handle the 'nested_in_vect_loop' case.
        Don't fail on zero step in the outer-loop for loads.
        (vect_analyze_data_refs): Call split_constant_offset to calculate base,
        offset and init relative to the outer-loop.

        * tree-vect-transform.c (vect_create_data_ref_ptr): Replace the unused
        BSI function argument with a new function argument - at_loop.
        Simplify the condition that determines STEP. Takes additional argument
        INV_P. Support outer-loop vectorization (handle the nested_in_vect_loop
        case), including zero step in the outer-loop. Call
        vect_create_addr_base_for_vector_ref with additional argument.
        (vect_create_addr_base_for_vector_ref): Takes additional argument LOOP.
        Updated function documentation. Handle the 'nested_in_vect_loop' case.
        Fixed and simplified calculation of step.
        (vectorizable_store): Call vect_create_data_ref_ptr with loop instead
        of bsi, and with additional argument. Call bump_vector_ptr with
        additional argument. Fix typos. Handle the 'nested_in_vect_loop' case.
        (vect_setup_realignment): Takes additional arguments INIT_ADDR and
        DR_ALIGNMENT_SUPPORT. Returns another value AT_LOOP. Handle the case
        when the realignment setup needs to take place inside the loop.  Support
        the dr_explicit_realign scheme. Allow generating the optimized
        realignment scheme for outer-loop vectorization. Added documentation.
        (vectorizable_load): Support the dr_explicit_realign scheme. Handle the
        'nested_in_vect_loop' case, including loads that are invariant in the
        outer-loop and the realignment schemes. Handle the case when the
        realignment setup needs to take place inside the loop. Call
        vect_setup_realignment with additional arguments.  Call
        vect_create_data_ref_ptr with additional argument and with loop instead
        of bsi. Fix 80-column overflow. Fix typos. Rename PHI_STMT to PHI.
        (vect_gen_niters_for_prolog_loop): Call
        vect_create_addr_base_for_vector_ref with additional arguments.
        (vect_create_cond_for_align_checks): Likewise.
        (bump_vector_ptr): Updated to support the new dr_explicit_realign
        scheme: takes additional argument bump; argument ptr_incr is now
        optional; updated documentation.
        (vect_init_vector): Takes additional argument (bsi). Use it, if
        available, to insert the vector initialization.
        (get_initial_def_for_induction): Pass additional argument in call to
        vect_init_vector.
        (vect_get_vec_def_for_operand): Likewise.
        (vect_setup_realignment): Likewise.
        (vectorizable_load): Likewise.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@127624 138bc75d-0d04-0410-961f-82ee72b054a4
40 files changed:
gcc/ChangeLog
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/vect/costmodel/ppc/costmodel-vect-outer-fir.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/vect/no-section-anchors-vect-outer-4h.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/vect/vect-117.c
gcc/testsuite/gcc.dg/vect/vect-outer-1.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/vect/vect-outer-1a.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/vect/vect-outer-1b.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/vect/vect-outer-2.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/vect/vect-outer-2a.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/vect/vect-outer-2b.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/vect/vect-outer-2c.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/vect/vect-outer-2d.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/vect/vect-outer-3.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/vect/vect-outer-3a.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/vect/vect-outer-3b.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/vect/vect-outer-3c.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/vect/vect-outer-4.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/vect/vect-outer-4a.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/vect/vect-outer-4b.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/vect/vect-outer-4c.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/vect/vect-outer-4d.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/vect/vect-outer-4e.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/vect/vect-outer-4f.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/vect/vect-outer-4g.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/vect/vect-outer-4i.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/vect/vect-outer-4j.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/vect/vect-outer-4k.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/vect/vect-outer-4l.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/vect/vect-outer-4m.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/vect/vect-outer-5.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/vect/vect-outer-6.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/vect/vect-outer-fir-lb.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/vect/vect-outer-fir.c [new file with mode: 0644]
gcc/tree-data-ref.c
gcc/tree-data-ref.h
gcc/tree-vect-analyze.c
gcc/tree-vect-transform.c
gcc/tree-vectorizer.c
gcc/tree-vectorizer.h