2010-06-25 Martin Jambor <mjambor@suse.cz>
* ipa-prop.c (determine_cst_member_ptr): Ignore non-clobbering
statements instead of bailing out on them.
(ipa_analyze_indirect_call_uses): Do not require that loads from the
parameter are in the same BB as the condition. Update comments.
* testsuite/g++.dg/ipa/iinline-2.C: New test.
From-SVN: r161377
PR middle-end/43866
* tree-ssa-loop-unswitch.c (tree_may_unswitch_on): If stmt is always
true or always false, return NULL_TREE.
(tree_unswitch_single_loop): Optimize conditions even when reaching
max-unswitch-level parameter. If num > 0, optimize first all conditions
using entry checks, then do still reachable block discovery and consider
only conditions in still reachable basic blocks in the loop.
* gfortran.dg/pr43866.f90: New test.
From-SVN: r161375
PR tree-optimization/44539
* tree-cfgcleanup.c (fixup_noreturn_call): Call update_stmt even when
the call doesn't have LHS, but has VDEF.
* gcc.dg/pr44539.c: New test.
From-SVN: r161374
2010-06-25 Paolo Carlini <paolo.carlini@oracle.com>
* include/profile/impl/profiler_trace.h: Uglify it to __it, use
everywhere std::size_t instead of size_t.
From-SVN: r161368
PR target/43902
* tree-pretty-print.c (dump_generic_node, op_code_prio): Add
WIDEN_MULT_PLUS_EXPR and WIDEN_MULT_MINUS_EXPR.
* optabs.c (optab_for_tree_code): Likewise.
(expand_widen_pattern_expr): Likewise.
* tree-ssa-math-opts.c (convert_mult_to_widen): New function, broken
out of execute_optimize_widening_mul.
(convert_plusminus_to_widen): New function.
(execute_optimize_widening_mul): Use the two new functions.
* expr.c (expand_expr_real_2): Add support for GIMPLE_TERNARY_RHS.
Remove code to generate widening multiply-accumulate. Add support
for WIDEN_MULT_PLUS_EXPR and WIDEN_MULT_MINUS_EXPR.
* gimple-pretty-print.c (dump_ternary_rhs): New function.
(dump_gimple_assign): Call it when appropriate.
* tree.def (WIDEN_MULT_PLUS_EXPR, WIDEN_MULT_MINUS_EXPR): New codes.
* cfgexpand.c (gimple_assign_rhs_to_tree): Likewise.
(expand_gimple_stmt_1): Likewise.
(expand_debug_expr): Support WIDEN_MULT_PLUS_EXPR and
WIDEN_MULT_MINUS_EXPR.
* tree-ssa-operands.c (get_expr_operands): Likewise.
* tree-inline.c (estimate_operator_cost): Likewise.
* gimple.c (extract_ops_from_tree_1): Renamed from
extract_ops_from_tree. Add new arg for a third operand; fill it.
(gimple_build_assign_stat): Support operations with three operands.
(gimple_build_assign_with_ops_stat): Likewise.
(gimple_assign_set_rhs_from_tree): Likewise.
(gimple_assign_set_rhs_with_ops_1): Renamed from
gimple_assign_set_rhs_with_ops. Add new arg for a third operand.
(get_gimple_rhs_num_ops): Support GIMPLE_TERNARY_RHS.
(get_gimple_rhs_num_ops): Handle WIDEN_MULT_PLUS_EXPR and
WIDEN_MULT_MINUS_EXPR.
* gimple.h (enum gimple_rhs_class): Add GIMPLE_TERNARY_RHS.
(extract_ops_from_tree_1): Adjust declaration.
(gimple_assign_set_rhs_with_ops_1): Likewise.
(gimple_build_assign_with_ops): Pass NULL for last operand.
(gimple_build_assign_with_ops3): New macro.
(gimple_assign_rhs3, gimple_assign_rhs3_ptr, gimple_assign_set_rhs3,
gimple_assign_set_rhs_with_ops, extract_ops_from_tree): New inline
functions.
* tree-cfg.c (verify_gimple_assign_ternary): New static function.
(verify_gimple_assign): Call it.
* doc/gimple.texi (Manipulating operands): Document GIMPLE_TERNARY_RHS.
(Tuple specific accessors, subsection GIMPLE_ASSIGN): Document new
functions for dealing with three-operand statements.
* tree.c (commutative_ternary_tree_code): New function.
* tree.h (commutative_ternary_tree_code): Declare it.
* tree-vrp.c (gimple_assign_nonnegative_warnv_p): Return false for ternary
statements.
(gimple_assign_nonzero_warnv_p): Likewise.
* tree-ssa-sccvn.c (stmt_has_constants): Handle GIMPLE_TERNARY_RHS.
* tree-ssa-ccp.c (get_rhs_assign_op_for_ccp): New static function.
(ccp_fold): Use it. Handle GIMPLE_TERNARY_RHS.
* tree-ssa-dom.c (enum expr_kind): Add EXPR_TERNARY.
(struct hashtable_expr): New member ternary in the union.
(initialize_hash_element): Handle GIMPLE_TERNARY_RHS.
(hashable_expr_equal_p): Fix indentation. Handle EXPR_TERNARY.
(iterative_hash_hashable_expr): Likewise.
(print_expr_hash_elt): Handle EXPR_TERNARY.
* gimple-fold.c (fold_gimple_assign): Handle GIMPLE_TERNARY_RHS.
* tree-ssa-threadedge.c (fold_assignment_stmt): Remove useless break
statements. Handle GIMPLE_TERNARY_RHS.
testsuite/
PR target/43902
* gcc.target/mips/madd-9.c: New test.
From-SVN: r161366
gcc/
2010-06-25 Shujing Zhao <pearly.zhao@oracle.com>
PR c/44517
* c-parser.c (c_parser_parms_list_declarator): Return NULL if one of
parameters are not good.
(c_parser_parameter_declaration): Error unknown type name if the type
name can't start declaration specifiers.
gcc/testsuite/
2010-06-25 Shujing Zhao <pearly.zhao@oracle.com>
PR c/44517
* gcc.dg/noncompile/pr44517.c: New.
* gcc.dg/noncompile/990416-1.c: Adjust expected error.
From-SVN: r161363
* ira-int.h (struct live_range, live_range_t): Renamed from struct
ira_allocno_live_range and allocno_live_range_t; all uses changed.
* ira-build.c (live_range_pool): Renamed from allocno_live_range_pool.
All uses changed.
From-SVN: r161350
* ira-build.c (merge_hard_reg_conflicts): New function.
(create_cap_allocno, copy_info_to_removed_store_destinations,
propagate_some_info_from_allocno, propagate_allocno_info): Use it.
(move_allocno_live_ranges, copy_allocno_live_ranges): New functions.
(remove_unnecessary_allocnos, remove_low_level_allocnos)
copy_nifo_to_removed_store_destination): Use them.
* ira-lives.c (make_hard_regno_born): New function, split out of
make_regno_born.
(make_allocno_born): Likewise.
(make_hard_regno_dead): New function, split out of make_regno_dead.
(make_allocno_dead): Likewise.
(inc_register_pressure): New function, split out of set_allocno_live.
(dec_register_pressure): New function, split out of clear_allocno_live.
(mark_pseudo_regno_live): New function, split out of mark_reg_live.
(mark_hard_reg_live): Likewise. Use inc_register_pressure.
(mark_pseudo_regno_dead): New function, split out of mark_reg_dead.
(mark_hard_reg_dead): Likewise. Use dec_register_pressure.
(make_pseudo_conflict): Use mark_pseudo_regno_dead and
mark_pseudo_regno_live.
(process_bb_node_lives): Use mark_pseudo_regno_live,
make_hard_regno_born and make_allocno_dead.
(make_regno_born, make_regno_dead, mark_reg_live, mark_reg_dead,
set_allocno_live, clear_allocno_live): Delete functions.
From-SVN: r161346
2010-06-24 Steve Ellcey <sje@cup.hp.com>
PR testsuite/43283
* gcc.dg/lto/20091216-1_0.c: Use newline instead of semicolon
and add argument to nop for IA64.
From-SVN: r161342
/java
* decl.c (java_init_decl_processing): Use double_int_to_tree instead
of build_int_cst_wide.
* boehm.c (set_bit): Remove.
(mark_reference_fields): Use double_int type for 'mask' argument.
Use double_int_setbit instead of set_bit.
(get_boehm_type_descriptor): Use double_int_setbit instead of
set_bit. Use double_int_to_tree instead of build_int_cst_wide.
From-SVN: r161288
* config/i386/i386 (mov<mode>): Macroize expander from mov{sf,df,xf}
using X87MODEF mode iterator.
(pushsf splitter): Macroize splitter using P mode iterator.
(*swap<mode>): Macroize insn from *swap{sf,df} using MODEF
mode iterator.
(*movxf_internal): Rename from *movxf_integer.
(*movxf_internal_nointeger): Rename from *movxf_nointeger.
(*movdf_internal_rex64): Rename from *movdf_integer_rex64.
(*movdf_internal): Rename from *movdf_integer.
(*movdf_internal_nointeger): Rename from *movdf_nointeger.
(*movsf_internal): Rename from *movdf_1.
From-SVN: r161287
2010-06-23 Thomas Quinot <quinot@adacore.com>
* exp_attr.adb (Expand_Access_To_Protected_Op): When rewriting a
reference to a protected subprogram outside of the protected's scope,
ensure the corresponding external subprogram is frozen before the
reference.
2010-06-23 Ed Schonberg <schonberg@adacore.com>
* sem_prag.adb: Fix typo in error message.
* sem.adb: Refine previous change.
2010-06-23 Robert Dewar <dewar@adacore.com>
* impunit.adb, a-suewen.adb, a-suewen.ads, a-suenco.adb, a-suenco.ads,
a-suezen.adb, a-suezen.ads, a-stuten.adb, a-stuten.ads, Makefile.rtl:
Implement Ada 2012 string encoding packages.
2010-06-23 Arnaud Charlet <charlet@adacore.com>
* a-stwiun-shared.adb, a-stwiun-shared.ads, a-stzunb-shared.adb,
a-stzunb-shared.ads, a-swunau-shared.adb, a-swuwti-shared.adb,
a-szunau-shared.adb, a-szuzti-shared.adb: New files.
* gcc-interface/Makefile.in: Enable use of above files.
From-SVN: r161277
2010-06-23 Ed Schonberg <schonberg@adacore.com>
* sem_ch13.adb (Check_Constant_Address_Clauses): Do not check legality
of address clauses if if Ignore_Rep_Clauses is active.
* freeze.adb (Check_Address_Clause): If Ignore_Rep_Clauses is active,
remove address clause from tree so that it does not reach the backend.
2010-06-23 Arnaud Charlet <charlet@adacore.com>
* exp_attr.adb (Expand_N_Attribute_Reference [Attribute_Valid]): Do not
expand 'Valid from user code in CodePeer mode, will be handled by the
back-end directly.
2010-06-23 Bob Duff <duff@adacore.com>
* g-comlin.ads: Minor comment improvements.
2010-06-23 Ed Schonberg <schonberg@adacore.com>
* sem_res.adb (Uses_SS): The expression that initializes a controlled
component of a record type may be a user-defined operator that is
rewritten as a function call.
From-SVN: r161271
2010-06-23 Eric Botcazou <ebotcazou@adacore.com>
* exp_ch11.adb (Expand_Local_Exception_Handlers): Propagate the end
label to the new sequence of statements. Set the sloc of the raise
statement onto the new goto statements.
2010-06-23 Robert Dewar <dewar@adacore.com>
* a-stuten.ads, a-stuten.adb: New files.
* impunit.adb: Add engtry for Ada.Strings.UTF_Encoding (a-stuten.ads)
* Makefile.rtl: Add entry for a-stuten (Ada.Strings.UTF_Encoding)
2010-06-23 Robert Dewar <dewar@adacore.com>
* gnat_ugn.texi: Add documentation of -gnat12 switch
Add documentation of -gnatX switch.
2010-06-23 Ed Schonberg <schonberg@adacore.com>
* inline.ads: Include the current Ada_Version in the info for pending
instance bodies, so that declaration and body are compiled with the
same Ada_Version.
* inline.adb: Move with_clause for Opt to spec.
* sem_ch12.adb (Analyze_Package_Instantiation,
Analyze_Subprogram_Instantiation): Save current Ada_Version in
Pending_Instantiation information.
(Instantiate_Package_Body, Instantiate_Subprogram_Body,
Inline_Package_Body): Use the Ada_Version present in the body
information.
2010-06-23 Robert Dewar <dewar@adacore.com>
* usage.adb: Add documentation for -gnat12 switch.
* errout.ads: Add VMS alias entry for -gnat12 switch
* gnat_rm.texi: Add documentation for pragma Ada_12 and Ada_2012
Add documentation for pragma Extensions_Allowed.
* opt.ads: Add entry for Ada 2012 mode.
* sem_ch4.adb, par-ch3.adb, par-ch4.adb: Use new Ada 2012 mode for 2012
features.
* sem_prag.adb, par-prag.adb: Add processing for pragma Ada_12 and
Ada_2012.
* sem_ch13.adb: Add handling for Ada 2012 mode.
* snames.ads-tmpl: Add entries for pragma Ada_2012 and Ada_12.
* switch-c.adb: Add handling for -gnat12 switch.
Implement -gnat2005 and -gnat2012.
* usage.adb: Add documentation for -gnat12 switch.
* vms_data.ads: Add /12 switch for Ada 2012 mode.
From-SVN: r161268