PR 68432: Add a target hook to control size/speed optab choices
[platform/upstream/gcc.git] / gcc / ChangeLog
index 94bde39..b7e853d 100644 (file)
@@ -1,3 +1,173 @@
+2015-12-02  Richard Sandiford  <richard.sandiford@arm.com>
+
+       PR tree-optimization/68432
+       * coretypes.h (optimization_type): New enum.
+       * doc/tm.texi.in (TARGET_OPTAB_SUPPORTED_P): New hook.
+       * doc/tm.texi: Regenerate.
+       * target.def (optab_supported_p): New hook.
+       * targhooks.h (default_optab_supported_p): Declare.
+       * targhooks.c (default_optab_supported_p): New function.
+       * predict.h (function_optimization_type): Declare.
+       (bb_optimization_type): Likewise.
+       * predict.c (function_optimization_type): New function.
+       (bb_optimization_type): Likewise.
+       * optabs-query.h (convert_optab_handler): Define an overload
+       that takes an optimization type.
+       (direct_optab_handler): Likewise.
+       * optabs-query.c (convert_optab_handler): Likewise.
+       (direct_optab_handler): Likewise.
+       * internal-fn.h (direct_internal_fn_supported_p): Take an
+       optimization_type argument.
+       * internal-fn.c (direct_optab_supported_p): Likewise.
+       (multi_vector_optab_supported_p): Likewise.
+       (direct_internal_fn_supported_p): Likewise.
+       * builtins.c (replacement_internal_fn): Update call to
+       direct_internal_fn_supported_p.
+       * gimple-match-head.c (build_call_internal): Likewise.
+       * tree-vect-patterns.c (vect_recog_pow_pattern): Likewise.
+       * tree-vect-stmts.c (vectorizable_internal_function): Likewise.
+       * tree.c (maybe_build_call_expr_loc): Likewise.
+       * config/i386/i386.c (ix86_optab_supported_p): New function.
+       (TARGET_OPTAB_SUPPORTED_P): Define.
+       * config/i386/i386.md (asinxf2): Remove optimize_insn_for_size_p check.
+       (asin<mode>2, acosxf2, acos<mode>2, log1pxf2, log1p<mode>2)
+       (expNcorexf3, expxf2, exp<mode>2, exp10xf2, exp10<mode>2, exp2xf2)
+       (exp2<mode>2, expm1xf2, expm1<mode>2, ldexpxf3, ldexp<mode>3)
+       (scalbxf3, scalb<mode>3, rint<mode>2, round<mode>2)
+       (<rounding_insn>xf2, <rounding_insn><mode>2): Likewise.
+
+2015-12-02  Richard Sandiford  <richard.sandiford@arm.com>
+
+       * Makefile.in (GENSUPPORT_H): New macro.
+       (build/gensupport.o, build/read-rtl.o, build/genattr.o)
+       (build/genattr-common.o, build/genattrtab.o, build/genautomata.o)
+       (build/gencodes.o, build/genconditions.o, build/genconfig.o)
+       (build/genconstants.o, build/genextract.o, build/genflags.o)
+       (build/gentarget-def.o): Use it.
+       (build/genemit.o): Likewise.  Depend on internal-fn.def.
+       * genopinit.c: Move block comment to optabs.def.
+       (optab_tag, optab_def): Move to gensupport.h
+       (pattern): Likewise, renaming to optab_pattern.
+       (match_pattern): Move to gensupport.c
+       (gen_insn): Use find_optab.
+       (patterns, pattern_cmp): Replace pattern with optab_pattern.
+       (main): Likewise.  Use num_optabs.
+       * optabs.def: Add comment that was previously in genopinit.c.
+       * gensupport.h (optab_tag): Moved from genopinit.c
+       (optab_def): Likewise, expanding commentary.
+       (optab_pattern): Likewise, after renaming from pattern.
+       (optabs, num_optabs, find_optab): Declare.
+       * gensupport.c (optabs): Moved from genopinit.c.
+       (num_optabs): New variable.
+       (match_pattern): Moved from genopinit.c.
+       (find_optab): New function, extracted from genopinit.c:gen_insn.
+       * genemit.c (nofail_optabs): New variable.
+       (emit_c_code): New function.
+       (gen_expand): Check whether the instruction is an optab that isn't
+       allowed to fail.  Call emit_c_code.
+       (gen_split): Call emit_c_code here too.
+       (main): Initialize nofail_optabs.  Don't emit FAIL and DONE here.
+
+2015-12-02  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
+
+       * config/s390/predicates.md (const_mask_operand): New predicate.
+       * config/s390/s390-builtins.def: Set a smaller bitmask for a few builtins.
+       * config/s390/vector.md: Change predicate from immediate_operand
+       to either const_int_operand or const_mask_operand.  Add special
+       insn conditions on patterns which have to exclude certain values.
+       * config/s390/vx-builtins.md: Likewise.
+
+2015-12-02  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
+
+       * config/s390/vector.md ("*vec_set<mode>"): Change shift count
+       mode from DI to SI.
+
+2015-12-02  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
+
+       * config/s390/s390-builtin-types.def: New builtin types added.
+       * config/s390/s390-builtins.def: Add s390_vec_splat_* definitions.
+       * config/s390/s390.c (s390_expand_builtin): Always truncate
+       constants to the mode in the pattern.
+       * config/s390/vecintrin.h: Let the vec_splat_* macros point to the
+       respective builtin __builtin_s390_vec_splat_*.
+
+2015-12-02  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
+
+       * config/s390/s390-builtin-types.def: Sort builtin types.
+
+2015-12-02  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
+
+       * config/s390/s390-c.c (s390_get_vstring_flags): Invert the
+       condition for the RT flag.
+
+2015-12-02  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
+
+       * config/s390/constraints.md ("jKK"): New constraint.
+       * config/s390/s390.c (tm-constrs.h): Include for
+       satisfies_constraint_*.
+       (s390_legitimate_constant_p): Allow jKK constants.  Use
+       satisfies_constraint_* also for the others.
+       (legitimate_reload_vector_constant_p): Likewise.
+       (print_operand): Allow h output modifier on vectors.
+       * config/s390/vector.md ("mov<mode>"): Add vrepi.
+
+2015-12-02  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
+
+       * config/s390/vector.md ("*vec_splats<mode>"): Fix constraint
+       latter I->K.
+
+2015-12-02  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
+
+       * config/s390/s390.md ("bswap<mode>2"): Add support for strv and
+       strvg.
+       ("bswaphi2"): New pattern.
+       New splitter for HI reg-reg bswap.
+
+2015-11-27  Jiri Engelthaler  <engycz@gmail.com>
+
+       PR driver/68029
+       * opts-common.c (prune_options): Don't ignore -fdiagnostics-color 
+       if it is the first parameter.
+
+2015-12-01  Richard Sandiford  <richard.sandiford@arm.com>
+
+       PR tree-optimization/68577
+       * tree-vect-stmts.c (simple_integer_narrowing): New function.
+       (vectorizable_call): Restrict internal function handling
+       to NONE and NARROW cases, using simple_integer_narrowing
+       to test for the latter.  Add cost of narrowing operation
+       and insert it where necessary.
+
+2015-12-01  Andreas Tobler  <andreast@gcc.gnu.org>
+
+       * config/rs6000/freebsd64.h (ELFv2_ABI_CHECK): Add new macro.
+       (SUBSUBTARGET_OVERRIDE_OPTIONS): Use it to decide whether to set
+       rs6000_current_abi to ABI_AIX or ABI_ELFv2.
+
+2015-12-01  Nathan Sidwell  <nathan@acm.org>
+
+       * config/nvptx/nvptx-protos.h (nvptx_output_aligned_decl): Declare.
+       * config/nvptx/nvptx.h (ASM_OUTPUT_ALIGNED_DECL_COMMON,
+       ASM_OUTPUT_ALIGNED_DECL_LOCAL): Forward to nvptx_output_aligned_decl.
+       * config/nvptx/nvptx.c (write_fn_marker, write_var_marker): New.
+       (write_fn_proto, write_fn_proto_from_insn): Call write_fn_marker.
+       (init_output_initializer): Call write_var_marker.
+       (nvptx_output_aligned_decl): New.
+       (nvptx_assemble_undefined_decl, nvptx_file_end): Call write_var_marker.
+
+2015-12-01  Jan Hubicka  <hubicka@ucw.cz>
+
+       * c-common.c (parse_optimize_options): Do not silently ignore
+       -fstrict-aliasing changes.
+
+2015-12-01  Jan Hubicka  <hubicka@ucw.cz>
+
+       * lto-streamer-out.c (hash_tree): Do not stream TYPE_ALIAS_SET.
+       * tree-streamer-out.c (pack_ts_type_common_value_fields): Do not
+       stream TYPE_ALIAS_SET.
+       * tree-streamer-in.c (unpack_ts_type_common_value_fields): Do not
+       stream TYPE_ALIAS_SET.
+
 2015-12-01  Nathan Sidwell  <nathan@acm.org>
 
        * config/nvptx/nvptx.c (nvptx_function_arg_advance): Don't