On Thu, Mar 26, 2015 at 11:25 AM, Bill Schmidt
<wschm...@linux.vnet.ibm.com> wrote:

>> This is a follow-up to
>> https://gcc.gnu.org/ml/gcc-patches/2015-03/msg01310.html, which
>> backported the POWER-specific little-endian swap optimization pass to
>> the 4.9 branch.  We also need to backport this to the 4.8 branch.  This
>> patch does that.
>>
>> The patch is very similar to the 4.9 backport, except for two things.
>> First, the passes infrastructure changed quite a bit between 4.8 and
>> 4.9, so the code to describe the new pass to the pass manager is
>> somewhat different.  Second, I've omitted three of the test cases, which
>> happen to fail on 4.8 for unrelated reasons.  (We run out of volatile
>> registers and end up saving non-volatiles to the stack in the prologue,
>> which generates load/swap sequences for now.)
>>
>> Tested on powerpc64le-unknown-linux-gnu with no regressions.  Is this OK
>> for 4.8?
>>
>> Thanks,
>> Bill
>>
>>
>> [gcc]
>>
>> 2015-03-26  Bill Schmidt  <wschm...@linux.vnet.ibm.com>
>>
>>       Backport of r214242, r214254, and bug fix patches from mainline
>>       * config/rs6000/rs6000.c (tree-pass.h): New #include.
>>       (rs6000_analyze_swaps): New declaration.
>>       (gate_analyze_swaps): New function.
>>       (execute_analyze_swaps): Likewise.
>>       (pass_analyze_swaps): New struct rtl_opt_pass.
>>       (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.
>>       * 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.
>>
>>
>> [gcc/testsuite]
>>
>> 2015-03-26  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-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-15.c: New test.
>>       * gcc.target/powerpc/swaps-p8-17.c: New test.

Okay.

Thanks, David

Reply via email to