On Wed, Mar 25, 2015 at 12:42 PM, Bill Schmidt
<wschm...@linux.vnet.ibm.com> wrote:
> Hi,
>
> The POWER-specific little-endian swap optimization pass has been burning
> in on mainline since last August.  Since then there have been a few
> improvements and bug fixes, but the code is very stable.  I've had some
> recent requests to get this code backported to 4.9, as it provides
> important performance benefits for vector computation.
>
> Most of the work is target-specific, but there are some
> target-independent changes to convert web.c to use a class structure so
> that this pass can inherit it.  This has caused no problems and was not
> controversial when added to trunk.
>
> The rest of the patch is straightforward backporting of the
> target-specific pieces and test cases.  There have been a few
> infrastructural changes to adjust to, but nothing major.
>
> After this goes in, I'll work on taking it back to 4.8 as well.  OK for
> 4.9?
>
> Thanks,
> Bill
>
>
> gcc:
>
> 2015-03-25  Bill Schmidt  <wschm...@linux.vnet.ibm.com>
>
>         Backport of r214242, r214254, and bug fix patches from mainline
>         * config/rs6000/rs6000.c (context.h): New #include.
>         (tree-pass.h): Likewise.
>         (make_pass_analyze_swaps): New declaration.
>         (rs6000_option_override): Register swap-optimization pass.
>         (swap_web_entry): New class.
>         (special_handling_values): New enum.
>         (union_defs): New function.
>         (union_uses): Likewise.
>         (insn_is_load_p): Likewise.
>         (insn_is_store_p): Likewise.
>         (insn_is_swap_p): Likewise.
>         (rtx_is_swappable_p): Likewise.
>         (insn_is_swappable_p): Likewise.
>         (chain_purpose): New enum.
>         (chain_contains_only_swaps): New function.
>         (mark_swaps_for_removal): Likewise.
>         (swap_const_vector_halves): Likewise.
>         (adjust_subreg_index): Likewise.
>         (permute_load): Likewise.
>         (permute_store): Likewise.
>         (adjust_extract): Likewise.
>         (adjust_splat): Likewise.
>         (handle_special_swappables): Likewise.
>         (replace_swap_with_copy): Likewise.
>         (dump_swap_insn_table): Likewise.
>         (rs6000_analyze_swaps): Likewise.
>         (pass_data_analyze_swaps): New pass_data.
>         (pass_analyze_swaps): New class.
>         (pass_analyze_swaps::gate): New method.
>         (pass_analyze_swaps::execute): New method.
>         (make_pass_analyze_swaps): New function.
>         * config/rs6000/rs6000.opt (moptimize-swaps): New option.
>         * df.h (web_entry_base): New class, replacing struct web_entry.
>         (web_entry_base::pred): New method.
>         (web_entry_base::set_pred): Likewise.
>         (web_entry_base::unionfind_root): Likewise.
>         (web_entry_base::unionfind_union): Likewise.
>         (unionfind_root): Delete external reference.
>         (unionfind_union): Likewise.
>         (union_defs): Likewise.
>         * web.c (web_entry_base::unionfind_root): Convert to method.
>         (web_entry_base::unionfind_union): Likewise.
>         (web_entry): New class.
>         (union_match_dups): Convert to use class structure.
>         (union_defs): Likewise.
>         (entry_register): Likewise.
>         (web_main): Likewise.
>
> [testsuite]
>
> 2015-03-25  Bill Schmidt  <wschm...@linux.vnet.ibm.com>
>
>         Backport r214254 and related tests from mainline
>         * gcc.target/powerpc/swaps-p8-1.c: New test.
>         * gcc.target/powerpc/swaps-p8-2.c: New test.
>         * gcc.target/powerpc/swaps-p8-3.c: New test.
>         * gcc.target/powerpc/swaps-p8-4.c: New test.
>         * gcc.target/powerpc/swaps-p8-5.c: New test.
>         * gcc.target/powerpc/swaps-p8-6.c: New test.
>         * gcc.target/powerpc/swaps-p8-7.c: New test.
>         * gcc.target/powerpc/swaps-p8-8.c: New test.
>         * gcc.target/powerpc/swaps-p8-9.c: New test.
>         * gcc.target/powerpc/swaps-p8-10.c: New test.
>         * gcc.target/powerpc/swaps-p8-11.c: New test.
>         * gcc.target/powerpc/swaps-p8-12.c: New test.
>         * gcc.target/powerpc/swaps-p8-13.c: New test.
>         * gcc.target/powerpc/swaps-p8-14.c: New test.
>         * gcc.target/powerpc/swaps-p8-15.c: New test.
>         * gcc.target/powerpc/swaps-p8-16.c: New test.
>         * gcc.target/powerpc/swaps-p8-17.c: New test.

Okay.

However, I was hoping to perform the backport of both this piece and
your newer swapping patches together, but those patches cannot go in
until GCC 5 is released and trunk is re-opened for non-bug fix
patches.  Once some of the optimizations are applied, users complain
about other extraneous swaps addressed by your next set of patches.

Thanks, David

Reply via email to