gcc/
* config/i386/i386.c: Include rtl-iter.h
(ix86_check_avx256_register): Take a const_rtx and return a bool.
(ix86_check_avx256_stores): Update call accordingly.
(ix86_avx_u128_mode_entry, ix86_avx_u128_mode_exit): Likewise.
(ix86_avx_u128_mode_needed): Likewise. Use FOR_EACH_SUBRTX.
From-SVN: r216758
gcc/
* config/alpha/alpha-protos.h (some_small_symbolic_operand_int):
Take an rtx and return a bool.
* config/alpha/alpha.c (some_small_symbolic_operand_int): Likewise.
Use FOR_EACH_SUBRTX_VAR.
* config/alpha/predicates.md (some_small_symbolic_operand): Update
accordingly.
From-SVN: r216757
gcc/
* config/s390/s390.c: Include rtl-iter.h.
(check_dpu): Delete.
(s390_loop_unroll_adjust): Only iterate over patterns.
Use FOR_EACH_SUBRTX.
From-SVN: r216753
2014-10-27 Phil Muldoon <pmuldoon@redhat.com>
Jan Kratochvil <jan.kratochvil@redhat.com>
Tom Tromey <tromey@redhat.com>
* aclocal.m4: New file.
* callbacks.cc: New file.
* callbacks.hh: New file.
* cc1plugin-config.h.in: New file.
* configure: New file.
* configure.ac: New file.
* connection.cc: New file.
* connection.hh: New file.
* findcomp.cc: New file.
* findcomp.hh: New file.
* libcc1.cc: New file.
* libcc1plugin.sym: New file.
* libcc1.sym: New file.
* Makefile.am: New file.
* Makefile.in: New file.
* marshall.cc: New file.
* marshall.hh: New file.
* names.cc: New file.
* names.hh: New file.
* plugin.cc: New file.
* rpc.hh: New file.
* status.hh: New file.
2014-10-27 Phil Muldoon <pmuldoon@redhat.com>
Jan Kratochvil <jan.kratochvil@redhat.com>
Tom Tromey <tromey@redhat.com>
* gcc-c-fe.def: New file.
* gcc-c-interface.h: New file.
* gcc-interface.h: New file.
2014-10-27 Phil Muldoon <pmuldoon@redhat.com>
Tom Tromey <tromey@redhat.com>
* c-tree.h (enum c_oracle_request): New.
(c_binding_oracle_function): New typedef.
(c_binding_oracle, c_pushtag, c_bind): Declare.
* c-decl.c (c_binding_oracle): New global.
(I_SYMBOL_CHECKED): New macro.
(i_symbol_binding): New function.
(I_SYMBOL_BINDING, I_SYMBOL_DECL): Redefine.
(I_TAG_CHECKED): New macro.
(i_tag_binding): New function.
(I_TAG_BINDING, I_TAG_DECL): Redefine.
(I_LABEL_CHECKED): New macro.
(i_label_binding): New function.
(I_LABEL_BINDING, I_LABEL_DECL): Redefine.
(c_print_identifier): Save and restore c_binding_oracle.
(c_pushtag, c_bind): New functions.
2014-10-27 Phil Muldoon <pmuldoon@redhat.com>
Tom Tromey <tromey@redhat.com>
* aclocal.m4, configure: Rebuild.
* Makefile.in (aclocal_deps): Add gcc-plugin.m4.
* configure.ac: Use GCC_ENABLE_PLUGINS.
* stor-layout.c (finish_bitfield_layout): Now public. Change
argument type to 'tree'.
(finish_record_layout): Update.
* stor-layout.h (finish_bitfield_layout): Declare.
2014-10-27 Tom Tromey <tromey@redhat.com>
* gcc-plugin.m4: New file.
2014-10-27 Phil Muldoon <pmuldoon@redhat.com>
Tom Tromey <tromey@redhat.com>
* Makefile.def: Add libcc1 to host_modules.
* configure.ac (host_tools): Add libcc1.
* Makefile.in, configure: Rebuild.
From-SVN: r216748
PR tree-optimization/61114
* doc/md.texi (Standard Names): Add reduc_(plus,[us](min|max))|scal
optabs, and note in reduc_[us](plus|min|max) to prefer the former.
* expr.c (expand_expr_real_2): Use reduc_..._scal if available, fall
back to old reduc_... + BIT_FIELD_REF only if not.
* optabs.c (optab_for_tree_code): for REDUC_(MAX,MIN,PLUS)_EXPR,
return the reduce-to-scalar (reduc_..._scal) optab.
(scalar_reduc_to_vector): New.
* optabs.def (reduc_smax_scal_optab, reduc_smin_scal_optab,
reduc_plus_scal_optab, reduc_umax_scal_optab, reduc_umin_scal_optab):
New.
* optabs.h (scalar_reduc_to_vector): Declare.
* tree-vect-loop.c (vectorizable_reduction): Look for optabs reducing
to either scalar or vector.
From-SVN: r216737
PR tree-optimization/61114
* expr.c (expand_expr_real_2): For REDUC_{MIN,MAX,PLUS}_EXPR, add
extract_bit_field around optab result.
* fold-const.c (fold_unary_loc): For REDUC_{MIN,MAX,PLUS}_EXPR, produce
scalar not vector.
* tree-cfg.c (verify_gimple_assign_unary): Check result vs operand type
for REDUC_{MIN,MAX,PLUS}_EXPR.
* tree-vect-loop.c (vect_analyze_loop): Update comment.
(vect_create_epilog_for_reduction): For direct vector reduction, use
result of tree code directly without extract_bit_field.
* tree.def (REDUC_MAX_EXPR, REDUC_MIN_EXPR, REDUC_PLUS_EXPR): Update
comment.
From-SVN: r216736
2014-10-27 Richard Biener <rguenther@suse.de>
* match.pd (0 % X): Properly use the iterator iterating over
all modulo operators.
(X % 1): Likewise.
From-SVN: r216732
* gcc-interface/misc.c (gnat_init_options_struct): Parameterize errno
support here instead of...
Do not set flag_delete_dead_exceptions to 1 unconditionally.
(gnat_init_gcc_eh): Set flag_delete_dead_exceptions to 1.
(gnat_init_gcc_fp): ...here.
From-SVN: r216731
* gcc-interface/utils.c (create_var_decl_1): For a variable declared
in the unit, set TREE_PUBLIC only if it has static storage duration.
From-SVN: r216729
2014-10-27 Richard Biener <rguenther@suse.de>
* tree-ssa-forwprop.c: Include tree-cfgcleanup.h and tree-into-ssa.h.
(lattice): New global.
(fwprop_ssa_val): New function.
(fold_all_stmts): Likewise.
(pass_forwprop::execute): Finally fold all stmts.
* gcc.dg/tree-ssa/forwprop-6.c: Scan ccp1 dump instead.
* gcc.dg/strlenopt-8.c: Adjust and XFAIL for non_strict_align
target due to memcpy inline-expansion.
From-SVN: r216728
* gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: Remove
superfluous computation for the max size.
<E_Array_Subtype>: Likewise. Make sure that the max size calculation
does not overflow at compile time.
From-SVN: r216725
In cp/error.c, I separate the initialization of the diagnostic context
from the initialization of the scratch pretty-printer (cxx_pp). This
was suggested by Gabriel in the last review of the patch and now I
realize it was a good idea. Now cxx_initialize_diagnostics is the
equivalent version of c_initialize_diagnostics. To avoid having to
make extern a bunch of functions, I moved it from cp-objcp-common.c to
error.c.
I moved the setting of diagnostic_format_decoder (global_dc) =
c_tree_printer, from c_objc_common_init to c_initialize_diagnostics,
and right after c_common_diagnostics_set_defaults. This
mimics what is done in cxx_initialize_diagnostics.
Moreover, in both c_initialize_diagnostics and
cxx_initialize_diagnostics, the FE-specific pretty-printer is
initialized first and then other settings are applied. This does not
make a difference right now, but if in the future one wishes to touch
something in the pretty-printer, it will not get overriden
immediately.
In fact, the code I removed in c_common_initialize_diagnostics, which
sets line_cutoff to 80, is useless because the pretty-printer created
here is actually never used, but overriden by the FE-specific
pretty-printers. This also means that doc/invoke.texi was wrong.
Finally, it is useless to set the maximum line length to 0 in the
constructor of cxx_pretty_printer. It is the default anyway.
gcc/c/ChangeLog:
2014-10-26 Manuel López-Ibáñez <manu@gcc.gnu.org>
PR c++/53061
* c-objc-common.c (c_objc_common_init): Do not do diagnostics
initialization here...
(c_initialize_diagnostics): ... but here. Set defaults after
building pretty-printer.
gcc/ChangeLog:
2014-10-26 Manuel López-Ibáñez <manu@gcc.gnu.org>
PR c++/53061
* doc/invoke.texi (fmessage-length): Update text to match reality.
gcc/cp/ChangeLog:
2014-10-26 Manuel López-Ibáñez <manu@gcc.gnu.org>
PR c++/53061
* cp-objcp-common.c: Do not include new.
(cxx_initialize_diagnostics): Move from here to ...
* error.c (cxx_initialize_diagnostics): : ... here. Move
diagnostics initialization here from init_error.
(cxx_pp): Use a real pointer not a macro.
(init_error): Just initialize cxx_pp.
* cxx-pretty-print.c (cxx_pretty_printer::cxx_pretty_printer): Do
not set maximum line length.
gcc/c-family/ChangeLog:
2014-10-26 Manuel López-Ibáñez <manu@gcc.gnu.org>
PR c++/53061
* c-opts.c (c_common_diagnostics_set_defaults): Renamed from
c_common_initialize_diagnostics.
* c-common.h: Likewise.
From-SVN: r216720
* config/pa/linux-unwind.h (pa32_read_access_ok): New function.
(pa32_fallback_frame_state): Use pa32_read_access_ok to check if
memory read accesses are ok.
From-SVN: r216716
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.
From-SVN: r216712
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 accordingly.
(r10k_needs_protection_p): Likewise.
From-SVN: r216711
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.
From-SVN: r216710
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.
From-SVN: r216708
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 accordingly.
From-SVN: r216707
gcc/
* 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.
From-SVN: r216705
gcc/
* 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.
From-SVN: r216704