Re: [PING][AARCH64, Question] Does AARCH64 GCC support long calls?

2014-10-25 Thread Yangfei (Felix)
> > Thanks for the reply. It seems that -mcmodel=large is different from > -mlong-calls. > > GCC still emit the BL instruction with -mcmodel=large. I thinks GCC should > emit BLR instruction with -mlong-calls, right? > > > Oh right. Also it looks like it is not hooked up but the support is par

Re: update address taken: don't drop clobbers

2014-10-25 Thread Marc Glisse
(replying to both messages) On Fri, 24 Oct 2014, Jeff Law wrote: [ https://gcc.gnu.org/ml/gcc-patches/2014-10/msg01830.html ] So I'm still trying to get comfortable with this patch. I guess my concerns about having one of the undefined value SSA_NAMEs appearing in two conflicting coalesce lis

Re: genmatch infinite loop during bootstrap on AIX

2014-10-25 Thread Richard Biener
On October 25, 2014 1:33:39 AM CEST, David Edelsohn wrote: >genmatch is hanging when bootstrapping on AIX (gcc111). When I attach >to the process: > >#0 0x1007efac in std::basic_string, >std::allocator >::basic_string () >#1 0x1000e6b0 in _ZN6parser13parse_captureEP7operand (this=0x300594b8, >o

Re: PATCH: fix breakage from "[PATCH] Fix genmatch linking"

2014-10-25 Thread Richard Biener
On October 24, 2014 6:47:10 PM CEST, Hans-Peter Nilsson wrote: >> From: Richard Biener >> Date: Fri, 24 Oct 2014 09:56:51 +0200 >> On Fri, 24 Oct 2014, Hans-Peter Nilsson wrote: >> > Still, I don't understand exactly how your patch >> > introduces build-subdirectories where there were none befor

[spu] RFA: Use new rtl iterators in ea_symbol_ref_p

2014-10-25 Thread Richard Sandiford
Make spu.c use FOR_EACH_SUBRTX instead of for_each_rtx, as part of a series to remove uses of for_each_rtx from the ports. Tested by making sure there were no code changes for gcc.dg, gcc.c-torture and g++.dg for spu-elf. OK to install? Thanks, Richard gcc/ * config/spu/spu.c: Include

[x86] RFA: Use new rtl iterators in ix86_check_avx256_register

2014-10-25 Thread Richard Sandiford
This is part of a series to remove uses of for_each_rtx from the ports. Tested by making sure there were no code changes for gcc.dg, gcc.c-torture and g++.dg for x86_64-linux-gnu, and also by a boostrap. OK to install? Thanks, Richard gcc/ * config/i386/i386.c: Include rtl-iter.h

[x86] RFA: Use new rtl iterators in x86_extended_reg_mentioned_p

2014-10-25 Thread Richard Sandiford
This is part of a series to remove uses of for_each_rtx from the ports. Tested by making sure there were no code changes for gcc.dg, gcc.c-torture and g++.dg for x86_64-linux-gnu, and also by a boostrap. OK to install? Thanks, Richard gcc/ * config/i386/i386.c (extended_reg_mentioned_1

[x86] RFA: Use new rtl iterators in find_constant

2014-10-25 Thread Richard Sandiford
This is part of a series to remove uses of for_each_rtx from the ports. It's a bit hard to read, so I've attached a -b version too. Tested by making sure there were no code changes for gcc.dg, gcc.c-torture and g++.dg for x86_64-linux-gnu, and also by a boostrap. OK to install? Thanks, Richard

[x86] RFA: Use new rtl iterators in ix86_loop_unroll_adjust

2014-10-25 Thread Richard Sandiford
This is part of a series to remove uses of for_each_rtx from the ports. It looks like this code should be iterating over the pattern rather than the full insn, or do MEMs in notes really count? If we iterate over the pattern then there should be no need for the test for null. Tested by making su

[m68k] RFA: Use new rtl iterators in m68k_final_prescan_insn

2014-10-25 Thread Richard Sandiford
This is part of a series to remove uses of for_each_rtx from the ports. Tested by making sure there were no code changes for gcc.dg, gcc.c-torture and g++.dg for m68k-elf. OK to install? Thanks, Richard gcc/ * config/m68k/m68k.c: Include rtl-iter.h. (m68k_final_prescan_insn_1):

[m68k] RFA: Use new rtl iterators in m68k_tls_reference_p

2014-10-25 Thread Richard Sandiford
This is part of a series to remove uses of for_each_rtx from the ports. Tested by making sure there were no code changes for gcc.dg, gcc.c-torture and g++.dg for m68k-elf. OK to install? Thanks, Richard gcc/ * config/m68k/m68k.c (m68k_tls_reference_p_1): Delete. (m68k_tls_refer

[xtensa] RFA: Use new rtl iterators in xtensa_tls_referenced_p

2014-10-25 Thread Richard Sandiford
This is part of a series to remove uses of for_each_rtx from the ports. Tested by making sure there were no code changes for gcc.dg, gcc.c-torture and g++.dg for xtensa-elf. OK to install? Thanks, Richard gcc/ * config/xtensa/xtensa.c: Include rtl-iter.h. (xtensa_tls_referenced

[mep] RFA: Use new rtl iterators in global_reg_mentioned_p

2014-10-25 Thread Richard Sandiford
This is part of a series to remove uses of for_each_rtx from the ports. The cases: case SCRATCH: case PC: case CC0: case CONST_INT: case CONST_DOUBLE: case CONST: case LABEL_REF: were just short-cuts to avoid looking through unnecessary subrtxes. SCRATCH, PC and CC0 do

[mep] RFA: Use new rtl iterators in mep_store_find_set

2014-10-25 Thread Richard Sandiford
This is part of a series to remove uses of for_each_rtx from the ports. Tested by making sure there were no code changes for gcc.dg, gcc.c-torture and g++.dg for mep-elf. OK to install? Thanks, Richard gcc/ * config/mep/mep.c (mep_store_find_set): Take a const_rtx and return a

[mep] RFA: Use new rtl iterators in mep_mul_hilo_bypass_p

2014-10-25 Thread Richard Sandiford
This is part of a series to remove uses of for_each_rtx from the ports. Tested by making sure there were no code changes for gcc.dg, gcc.c-torture and g++.dg for mep-elf. OK to install? Thanks, Richard gcc/ * config/mep/mep.c (mep_mul_hilo_bypass_1): Delete. (mep_mul_hilo_bypas

[MIPS] RFA: Use new rtl iterators in mips_small_data_pattern_p

2014-10-25 Thread Richard Sandiford
This is part of a series to remove uses of for_each_rtx from the ports. Tested by making sure there were no code changes for gcc.dg, gcc.c-torture and g++.dg for mips64-elf. OK to install? Thanks, Richard gcc/ * config/mips/mips.c: Include rtl-iter.h. (mips_small_data_pattern_1

[MIPS] RFA: Use new rtl iterators in mips_rewrite_small_data

2014-10-25 Thread Richard Sandiford
This is part of a series to remove uses of for_each_rtx from the ports. Tested by making sure there were no code changes for gcc.dg, gcc.c-torture and g++.dg for mips64-elf. OK to install? Thanks, Richard gcc/ * config/mips/mips.c (mips_rewrite_small_data_1): Take the context a

[MIPS] RFA: Use new rtl iterators in mips_kernel_reg_p

2014-10-25 Thread Richard Sandiford
This is part of a series to remove uses of for_each_rtx from the ports. Tested by making sure there were no code changes for gcc.dg, gcc.c-torture and g++.dg for mips64-elf. OK to install? Thanks, Richard gcc/ * config/mips/mips.c (mips_kernel_reg_p): Replace with... (mips_refe

[MIPS] RFA: Use new rtl iterators in mips16_rewrite_pool_refs

2014-10-25 Thread Richard Sandiford
This is part of a series to remove uses of for_each_rtx from the ports. Note that the order of the UNSPEC and TARGET_MIPS16_TEXT_LOADS handling didn't matter because we never rewrite the unspec itself; the check is there to protect the contents of the unspec. Tested by making sure there were no co

[MIPS] RFA: Use new rtl iterators in r10k_needs_protection_p_1

2014-10-25 Thread Richard Sandiford
This is part of a series to remove uses of for_each_rtx from the ports. Tested by making sure there were no code changes for gcc.dg, gcc.c-torture and g++.dg for mips64-elf. OK to install? Thanks, Richard gcc/ * config/mips/mips.c (r10k_needs_protection_p_1): Take an rtx rather

[MIPS] RFA: Use new rtl iterators in r10k_needs_protection_p_call

2014-10-25 Thread Richard Sandiford
This is part of a series to remove uses of for_each_rtx from the ports. Tested by making sure there were no code changes for gcc.dg, gcc.c-torture and g++.dg for mips64-elf. OK to install? Thanks, Richard gcc/ * config/mips/mips.c (r10k_needs_protection_p_call): Take a const_rtx

[MIPS] RFA: Use new rtl iterators in mips_sim_wait_regs_1

2014-10-25 Thread Richard Sandiford
This is part of a series to remove uses of for_each_rtx from the ports. Tested by making sure there were no code changes for gcc.dg, gcc.c-torture and g++.dg for mips64-elf. OK to install? Thanks, Richard gcc/ * config/mips/mips.c (mips_sim_insn): Update comment. (mips_sim_wait

[MIPS] RFA: Use new rtl iterators in mips_record_lo_sums

2014-10-25 Thread Richard Sandiford
This is part of a series to remove uses of for_each_rtx from the ports. Tested by making sure there were no code changes for gcc.dg, gcc.c-torture and g++.dg for mips64-elf. OK to install? Thanks, Richard gcc/ * config/mips/mips.c (mips_record_lo_sum): Replace with... (mips_rec

[MIPS] RFA: Use new rtl iterators in mips_need_noat_wrapper_p

2014-10-25 Thread Richard Sandiford
This is part of a series to remove uses of for_each_rtx from the ports. Tested by making sure there were no code changes for gcc.dg, gcc.c-torture and g++.dg for mips64-elf. OK to install? Thanks, Richard gcc/ * config/mips/mips.c (mips_at_reg_p): Delete. (mips_need_noat_wrappe

[FRV] RFA: Use new rtl iterators in frv_ifcvt_modify_tests

2014-10-25 Thread Richard Sandiford
This is part of a series to remove uses of for_each_rtx from the ports. In this particular cases there's a find_all_hard_regs function that can be used instead, although rtl.h needs to be included after hard-reg-set.h in order to get the declaration: #ifdef HARD_CONST extern void find_all_hard_reg

[FRV] RFA: Use new rtl iterators in frv_acc_group

2014-10-25 Thread Richard Sandiford
This is part of a series to remove uses of for_each_rtx from the ports. Tested by making sure there were no code changes for gcc.dg, gcc.c-torture and g++.dg for frv-elf. OK to install? Thanks, Richard gcc/ * config/frv/frv.c: Include rtl-iter.h. (frv_acc_group_1): Delete.

[FRV] RFA: Use new rtl iterators in frv_registers_conflict_p_1

2014-10-25 Thread Richard Sandiford
This is part of a series to remove uses of for_each_rtx from the ports. Tested by making sure there were no code changes for gcc.dg, gcc.c-torture and g++.dg for frv-elf. OK to install? Thanks, Richard gcc/ * config/frv/frv.c (frv_registers_conflict_p_1): Take an rtx rather tha

[FRV] RFA: Use new rtl iterators in frv_io_handle_use

2014-10-25 Thread Richard Sandiford
This is part of a series to remove uses of for_each_rtx from the ports. As with the first FR-V patch, we can find_all_hard_regs instead. Tested by making sure there were no code changes for gcc.dg, gcc.c-torture and g++.dg for frv-elf. OK to install? Thanks, Richard gcc/ * config/frv/f

[ARC] RFA: Use new rtl iterators in arc_rewrite_small_data

2014-10-25 Thread Richard Sandiford
This is part of a series to remove uses of for_each_rtx from the ports. As with the first FR-V patch, we can find_all_hard_regs instead. Tested by making sure there were no code changes for gcc.dg, gcc.c-torture and g++.dg for arc-elf. OK to install? Thanks, Richard gcc/ * config/arc/a

[ARC] RFA: Use new rtl iterators in small_data_pattern

2014-10-25 Thread Richard Sandiford
This is part of a series to remove uses of for_each_rtx from the ports. Tested by making sure there were no code changes for gcc.dg, gcc.c-torture and g++.dg for arc-elf. OK to install? Thanks, Richard gcc/ * config/arc/arc.c (arc_rewrite_small_data_p): Constify argument. (smal

Re: [ARC] RFA: Use new rtl iterators in arc_rewrite_small_data

2014-10-25 Thread Richard Sandiford
Richard Sandiford writes: > This is part of a series to remove uses of for_each_rtx from the ports. > As with the first FR-V patch, we can find_all_hard_regs instead. Oops, forgot that line :-)

[ARC] RFA: Use new rtl iterators in arc600_corereg_hazard

2014-10-25 Thread Richard Sandiford
This is part of a series to remove uses of for_each_rtx from the ports. Tested by making sure there were no code changes for gcc.dg, gcc.c-torture and g++.dg for arc-elf. OK to install? Thanks, Richard gcc/ * config/arc/arc.c (arc600_corereg_hazard_1): Delete. (arc600_corereg_h

[ARC] RFA: Use new rtl iterators in arc_write_ext_corereg

2014-10-25 Thread Richard Sandiford
This is part of a series to remove uses of for_each_rtx from the ports. Tested by making sure there were no code changes for gcc.dg, gcc.c-torture and g++.dg for arc-elf. OK to install? Thanks, Richard gcc/ * config/arc/arc.c (write_ext_corereg_1): Delete. (arc_write_ext_corere

[SH] RFA: Use new rtl iterators in shmedia_cleanup_truncate

2014-10-25 Thread Richard Sandiford
This is part of a series to remove uses of for_each_rtx from the ports. There are some some small rearrangements to cope with the 80-character limit. Tested by making sure there were no code changes for gcc.dg, gcc.c-torture and g++.dg for sh-elf. OK to install? Thanks, Richard gcc/ *

[SH] RFA: Use new rtl iterators in sh_contains_memref_p

2014-10-25 Thread Richard Sandiford
This is part of a series to remove uses of for_each_rtx from the ports. Tested by making sure there were no code changes for gcc.dg, gcc.c-torture and g++.dg for sh-elf. OK to install? Thanks, Richard gcc/ * config/sh/sh.c (sh_contains_memref_p_1): Delete. (sh_contains_memref_p

[microblaze] RFA: Use new rtl iterators in microblaze_tls_referenced_p

2014-10-25 Thread Richard Sandiford
This is part of a series to remove uses of for_each_rtx from the ports. Tested by making sure there were no code changes for gcc.dg, gcc.c-torture and g++.dg for microblaze-elf. OK to install? Thanks, Richard gcc/ * config/microblaze/microblaze.c: Include rtl-iter.h. (microblaz

[s390] RFA: Use new rtl iterators in s390_loop_unroll_adjust

2014-10-25 Thread Richard Sandiford
This is part of a series to remove uses of for_each_rtx from the ports. I think we only want to consider MEMs in patterns here, not MEMs in notes etc. (Not sure why I "fixed" it for s390 but not for x86...) Tested by making sure there were no code changes for gcc.dg, gcc.c-torture and g++.dg for s

[alpha] RFA: Use new rtl iterators in split_small_symbolic_operand

2014-10-25 Thread Richard Sandiford
This is part of a series to remove uses of for_each_rtx from the ports. Tested by making sure there were no code changes for gcc.dg, gcc.c-torture and g++.dg for alpha-linux-gnu. OK to install? Thanks, Richard gcc/ * config/alpha/alpha.c: Include rtl-iter.h. (split_small_symbol

[alpha] RFA: Use new rtl iterators in alpha_set_memflags

2014-10-25 Thread Richard Sandiford
This is part of a series to remove uses of for_each_rtx from the ports. Tested by making sure there were no code changes for gcc.dg, gcc.c-torture and g++.dg for alpha-linux-gnu. OK to install? Thanks, Richard gcc/ * config/alpha/alpha.c (alpha_set_memflags_1): Delete. (alpha_s

[alpha] RFA: Use new rtl iterators in alpha_find_lo_sum_using_gp

2014-10-25 Thread Richard Sandiford
This is part of a series to remove uses of for_each_rtx from the ports. Tested by making sure there were no code changes for gcc.dg, gcc.c-torture and g++.dg for alpha-linux-gnu. OK to install? Thanks, Richard gcc/ * config/alpha/alpha-protos.h (alpha_find_lo_sum_using_gp): Return

[alpha] RFA: Use new rtl iterators in some_small_symbolic_operand_int

2014-10-25 Thread Richard Sandiford
This is part of a series to remove uses of for_each_rtx from the ports. Tested by making sure there were no code changes for gcc.dg, gcc.c-torture and g++.dg for alpha-linux-gnu. OK to install? Thanks, Richard gcc/ * config/alpha/alpha-protos.h (some_small_symbolic_operand_int):

Re: [PATCH] PR36312

2014-10-25 Thread Anthony Brandon
Hi, Sorry for the delay. Here are the updated diff and changelog. gcc/testsuite/ChangeLog: 2014-10-25 Anthony Brandon PR driver/36312 * gcc.misc-tests/output.exp: New test case for identical input and output files. include/ChangeLog: 2014-10-25 Anthony Brandon PR driver/363

Re: [m68k] RFA: Use new rtl iterators in m68k_final_prescan_insn

2014-10-25 Thread Andreas Schwab
Richard Sandiford writes: > gcc/ > * config/m68k/m68k.c: Include rtl-iter.h. > (m68k_final_prescan_insn_1): Delete. > (m68k_final_prescan_insn): Use FOR_EACH_SUBRTX_VAR. Ok. Andreas. -- Andreas Schwab, sch...@linux-m68k.org GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D

Re: [m68k] RFA: Use new rtl iterators in m68k_tls_reference_p

2014-10-25 Thread Andreas Schwab
Richard Sandiford writes: > gcc/ > * config/m68k/m68k.c (m68k_tls_reference_p_1): Delete. > (m68k_tls_reference_p): Use FOR_EACH_SUBRTX_VAR. Ok. Andreas. -- Andreas Schwab, sch...@linux-m68k.org GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5 "And now for

Re: genmatch infinite loop during bootstrap on AIX

2014-10-25 Thread David Edelsohn
This occurs in genmatch builti in stage2. Revision 216674. Because of the previous build breakage during the merge, it is difficult to know exactly what was working. GCC seemed to be able to build with the earlier genmatch patch. Running genmatch --gimple match.pd produces no output and spins i

Re: genmatch infinite loop during bootstrap on AIX

2014-10-25 Thread David Edelsohn
It may be fallout from Maxim's scheduler patch. I'm testing that. Backing up before Maxim's patch and your genmatch patch does not enter an endless loop. - David On Sat, Oct 25, 2014 at 4:06 AM, Richard Biener wrote: > On October 25, 2014 1:33:39 AM CEST, David Edelsohn wrote: >>genmatch is ha

[C PATCH] Add 'aka's on type printing in diagnostics

2014-10-25 Thread Marek Polacek
This patch teaches the compiler to also print the typedef-stripped version of a type when appropriate. C++ FE does this for a few years now. With this patch we're able to say note: expected 'B * {aka struct A *}' but argument is of type 'struct B *' Compare that with note: expected 'struct B *' b

Re: update address taken: don't drop clobbers

2014-10-25 Thread Marc Glisse
On Fri, 24 Oct 2014, Jeff Law wrote: I'm starting to agree -- a later message indicated you wanted to drop the unlink_stmt_vdef call and you wanted to avoid gsi_replace, that seems fine. I'll approve once those things are taken care of. The following passed bootstrap+testsuite. I wasn't sure

support operator list

2014-10-25 Thread Prathamesh Kulkarni
Hi, This patch adds support for operator-lists, and uses them in match-bitwise.pd and match-comparison.pd * genmatch.c (parser::parse_operator_list): New member function in parser. (add_substitute): New function. (flatten_substitutes): Likewise. (parser::parse_for): Call add_su

Re: genmatch infinite loop during bootstrap on AIX

2014-10-25 Thread David Edelsohn
Bootstrap succeeds with Maxim's patch (r216624). The other, significant changes I see on trunk between r216624 and r216674 are: match-and-simplify through r216632 ipc-icf in r216662 libstdc++ in r216667 No other patches to trunk *seem* like they should affect PPC bootstrap. - David On Sat, Oc

Re: [PATCH, fixincludes]: Add pthread.h to glibc_c99_inline_4 fix

2014-10-25 Thread Bruce Korb
On 10/21/14 02:30, Uros Bizjak wrote: 2014-10-21 Uros Bizjak * inclhack.def (glibc_c99_inline_4): Add pthread.h to files. * fixincl.x: Regenerate. Bootstrapped and regression tested on CentOS 5.11 x86_64-linux-gnu {,-m32}. OK for mainline?

Re: [PATCH, fixincludes]: Add pthread.h to glibc_c99_inline_4 fix

2014-10-25 Thread Bruce Korb
On 10/25/14 10:40, Bruce Korb wrote: On 10/21/14 02:30, Uros Bizjak wrote: 2014-10-21 Uros Bizjak * inclhack.def (glibc_c99_inline_4): Add pthread.h to files. * fixincl.x: Regenerate. Bootstrapped and regression tested on CentOS 5.11 x86_64-linux-gnu {,-m32}. OK for mainline? I

Re: [Patch, Fortran] Add CO_REDUCE

2014-10-25 Thread Andreas Schwab
Tobias Burnus writes: > diff --git a/gcc/testsuite/gfortran.dg/coarray_collectives_14.f90 > b/gcc/testsuite/gfortran.dg/coarray_collectives_14.f90 > new file mode 100644 > index 000..f0ab932 > --- /dev/null > +++ b/gcc/testsuite/gfortran.dg/coarray_collectives_14.f90 FAIL: gfortran.dg/coarr

Re: [SH] RFA: Use new rtl iterators in shmedia_cleanup_truncate

2014-10-25 Thread Oleg Endo
On Oct 25, 2014, at 12:02 PM, Richard Sandiford wrote: > This is part of a series to remove uses of for_each_rtx from the ports. > There are some some small rearrangements to cope with the 80-character limit. > > Tested by making sure there were no code changes for gcc.dg, gcc.c-torture > and

Re: [SH] RFA: Use new rtl iterators in sh_contains_memref_p

2014-10-25 Thread Oleg Endo
On Oct 25, 2014, at 12:03 PM, Richard Sandiford wrote: > This is part of a series to remove uses of for_each_rtx from the ports. > > Tested by making sure there were no code changes for gcc.dg, gcc.c-torture > and g++.dg for sh-elf. OK to install? OK with me. Cheers, Oleg > gcc/ >*

[match-and-simplify] error checking on user defined oper in for

2014-10-25 Thread Prathamesh Kulkarni
Currently this is accepted: (for plus (mult div) ...) which is incorrect. This patch puts more error-checks on the user-defined operator in for-pattern. * genmatch.c (insert_operator): New function. (parse_for): Call insert_operator. Thanks, Prathamesh Index: gcc/genmatch.c

Re: [mep] RFA: Use new rtl iterators in global_reg_mentioned_p

2014-10-25 Thread DJ Delorie
> * config/mep/mep.c: Include rtl-iter.h. > (global_reg_mentioned_p_1): Take a const_rtx and return a bool. > (xtensa_tls_referenced_p): Return a bool. Use FOR_EACH_SUBRTX. OK.

Re: [mep] RFA: Use new rtl iterators in mep_store_find_set

2014-10-25 Thread DJ Delorie
> * config/mep/mep.c (mep_store_find_set): Take a const_rtx and > return a bool. Replace "void *" with specific type. Iterate > over all subrtxes. > (mep_store_data_bypass_1): Update calls accordingly. OK.

Re: [xtensa] RFA: Use new rtl iterators in xtensa_tls_referenced_p

2014-10-25 Thread augustine.sterl...@gmail.com
On Sat, Oct 25, 2014 at 2:17 AM, Richard Sandiford wrote: > This is part of a series to remove uses of for_each_rtx from the ports. > > Tested by making sure there were no code changes for gcc.dg, gcc.c-torture > and g++.dg for xtensa-elf. OK to install? OK for Xtensa

Re: [mep] RFA: Use new rtl iterators in mep_mul_hilo_bypass_p

2014-10-25 Thread DJ Delorie
> gcc/ > * config/mep/mep.c (mep_mul_hilo_bypass_1): Delete. > (mep_mul_hilo_bypass_p): Use FOR_EACH_SUBRTX. OK.

[committed] Fix reassoc bit test optimization (PR tree-optimization/63641)

2014-10-25 Thread Jakub Jelinek
Hi! Ian reported a bug in optimize_range_tests_to_bit_test, high used to be off-by-one. E.g. if the topmost bit in mask is set (wi::clz (mask) is 0), then the highest number covered by the mask is lowi (which corresponds to bit 0) + prec - 1, rather than lowi + prec. Fixed thusly, bootstrapped/r

RE: [MIPS] RFA: Use new rtl iterators in mips_rewrite_small_data

2014-10-25 Thread Matthew Fortune
> gcc/ > * config/mips/mips.c (mips_rewrite_small_data_1): Take the context > as a parameter instead of the containing MEM. Iterate over all > subrtxes. Don't return a value. > (mips_rewrite_small_data): Update call accordingly. OK

RE: [MIPS] RFA: Use new rtl iterators in mips_small_data_pattern_p

2014-10-25 Thread Matthew Fortune
> gcc/ > * config/mips/mips.c: Include rtl-iter.h. > (mips_small_data_pattern_1): Take an rtx rather than an rtx pointer. > Take the context as a parameter instead of the containing MEM. > Iterate over all subrtxes. > (mips_small_data_pattern_p): Update call accordingl

RE: [MIPS] RFA: Use new rtl iterators in mips16_rewrite_pool_refs

2014-10-25 Thread Matthew Fortune
> gcc/ > * config/mips/mips.c (mips16_rewrite_pool_refs_info): Delete. > (mips16_rewrite_pool_refs): Take the insn and constant pool as > parameters. Iterate over the instruction's pattern and return void. > (mips16_lay_out_constants): Update accordingly. OK

RE: [MIPS] RFA: Use new rtl iterators in r10k_needs_protection_p_1

2014-10-25 Thread Matthew Fortune
> gcc/ > * config/mips/mips.c (r10k_needs_protection_p_1): Take an rtx > rather than an rtx pointer. Change type of insn from "void *" > to its real type. Return bool rather than int. Iterate over > all subrtxes here. > (r10k_needs_protection_p_store): Update accord

RE: [MIPS] RFA: Use new rtl iterators in mips_kernel_reg_p

2014-10-25 Thread Matthew Fortune
> gcc/ > * config/mips/mips.c (mips_kernel_reg_p): Replace with... > (mips_refers_to_kernel_reg_p): ...this new function. > (mips_expand_prologue): Update accordingly. OK

RE: [MIPS] RFA: Use new rtl iterators in mips_sim_wait_regs_1

2014-10-25 Thread Matthew Fortune
> gcc/ > * config/mips/mips.c (mips_sim_insn): Update comment. > (mips_sim_wait_regs_2): Delete. > (mips_sim_wait_regs_1): Use FOR_EACH_SUBRTX_VAR. OK

RE: [MIPS] RFA: Use new rtl iterators in mips_record_lo_sums

2014-10-25 Thread Matthew Fortune
> gcc/ > * config/mips/mips.c (mips_record_lo_sum): Replace with... > (mips_record_lo_sums): ...this new function. > (mips_reorg_process_insns): Update accordingly. OK

RE: [MIPS] RFA: Use new rtl iterators in r10k_needs_protection_p_call

2014-10-25 Thread Matthew Fortune
> gcc/ > * config/mips/mips.c (r10k_needs_protection_p_call): Take a const_rtx > and return a bool. Iterate over all subrtxes here. > (r10k_needs_protection_p): Update accordingly. OK

RE: [MIPS] RFA: Use new rtl iterators in mips_need_noat_wrapper_p

2014-10-25 Thread Matthew Fortune
> gcc/ > * config/mips/mips.c (mips_at_reg_p): Delete. > (mips_need_noat_wrapper_p): Use FOR_EACH_SUBRTX. OK. That should be the last one to cover all changes to use new rtl iterators for MIPS. Thanks for splitting this up per change it made it easy to read through. Matthew

Re: genmatch infinite loop during bootstrap on AIX

2014-10-25 Thread David Edelsohn
Richard, I confirmed again with gcc111, which fails with r216632 and succeeds with r216624. On my internal AIX system bootstrapping with GCC 4.7.3, it enters an infinite loop in stage 1. With gcc111 and bootstrapping with GCC 4.8.1, it enters an infinite loop in stage 2. Thanks, David On Sat,

Re: support operator list

2014-10-25 Thread Prathamesh Kulkarni
Fixed a silly mistake in match-bitwise.pd (I had put ')' at wrong place). This patch also checks if operator-list is used outside for-pattern (in parser::parse_operation). * genmatch.c (user_id): Add new member is_oper_list. (user_id::user_id): Add new default argument. (parser::parse_