2011-10-07 Andrew Stubbs <ams@codesourcery.com>
gcc/
* config/arm/predicates.md (shift_amount_operand): Remove constant
range check.
(shift_operator): Check range of constants for all shift operators.
gcc/testsuite/
* gcc.dg/pr50193-1.c: New file.
* gcc.target/arm/shiftable.c: New file.
From-SVN: r179662
2011-10-07 Andrew Stubbs <ams@codesourcery.com>
gcc/
* config/arm/predicates.md (shift_amount_operand): Remove constant
range check.
(shift_operator): Check range of constants for all shift operators.
gcc/testsuite/
* gcc.dg/pr50193-1.c: New file.
* gcc.target/arm/shiftable.c: New file.
From-SVN: r179661
2011-10-07 Janus Weil <janus@gcc.gnu.org>
PR fortran/50625
* class.c (gfc_build_class_symbol): Fix whitespace.
* module.c (mio_symbol): Set 'class_ok' attribute.
* trans-decl.c (gfc_get_symbol_decl): Make sure the backend_decl has
been built for class symbols.
2011-10-07 Janus Weil <janus@gcc.gnu.org>
PR fortran/50625
* gfortran.dg/class_46.f03: New.
From-SVN: r179660
* function.c (frame_required_for_rtx): Remove function.
(requires_stack_frame_p): New arg set_up_by_prologue. All callers
changed. Compute a set of mentioned registers and compare against
the new arg rather than calling frame_required_for_rtx.
(thread_prologue_and_epilogue_insns): Compute the set_up_by_prologue
reg set. Convert the unconverted_simple_returns mechanism to store
jump insns rather than their basic blocks. Also check the
orig_entry_edge destination for new blocks.
From-SVN: r179654
PR lto/50492
* gcc-interface/gigi.h (gnat_pushdecl): Adjust comment.
* gcc-interface/utils.c (global_context): New variable.
(gnat_pushdecl): Initialize it and set it as the DECL_CONTEXT of DECLs
that are either public external or at top level. Use "No" macro.
(end_subprog_body): Call decl_function_context.
(rest_of_subprog_body_compilation): Likewise.
From-SVN: r179652
* gcc-interface/gigi.h (gnat_useless_type_conversion): Declare.
(rest_of_subprog_body_compilation): Likewise.
* gcc-interface/decl.c (gnat_to_gnu_entity) <E_Variable>: For renaming,
test for useless conversions by means of gnat_useless_type_conversion.
* gcc-interface/trans.c: Include bitmap.h and cgraph.h.
(language_function): Add named_ret_val and other_ret_val.
(f_named_ret_val): New macro.
(f_other_ret_val): Likewise.
(gigi): Call rest_of_subprog_body_compilation.
(struct nrv_data): New structure.
(is_nrv_p): New predicate.
(prune_nrv_r): New helper function.
(prune_nrv_in_block): New function.
(finalize_nrv_r): New helper function.
(finalize_nrv): New function.
(return_value_ok_for_nrv_p): New predicate.
(build_return_expr): If optimization is enabled, record candidates for
the Named Return Value optimization.
(build_function_stub): Call rest_of_subprog_body_compilation.
(Subprogram_Body_to_gnu): If optimization is enabled and there are
candidates, finalize the Named Return Value optimization.
Call rest_of_subprog_body_compilation.
(call_to_gnu): At the end, if a return value is needed, simplify the
result before wrapping it up in a COMPOUND_EXPR.
* gcc-interface/utils.c (end_subprog_body): Split into...
(rest_of_subprog_body_compilation): ...this. New function.
(gnat_useless_type_conversion): Likewise.
From-SVN: r179650
2011-10-07 Andreas Krebbel <Andreas.Krebbel@de.ibm.com>
* config/s390/s390.md (DWH, dwh): New mode macros.
("umulsidi3"): Extend to support "umulditi3" as well.
From-SVN: r179647
PR target/50603
* config/i386/i386.c (ix86_fixup_binary_operands): Force src2 of
integer PLUS RTX to a register to improve address combine.
testsuite/ChangeLog:
PR target/50603
* gcc.target/i386/pr50603.c: New test.
From-SVN: r179646
PR 50632
* combine-stack-adjust.c (maybe_move_args_size_note): Add after
parameter; use it to decide whether to merge two notes.
(combine_stack_adjustments_for_block): Use maybe_move_args_size_note
for the deallocation case as well.
From-SVN: r179637
2011-10-06 Thomas Quinot <quinot@adacore.com>
* einfo.ads, exp_attr.adb, exp_ch3.adb, exp_ch4.adb, exp_ch7.adb,
exp_ch9.adb, exp_ch9.ads, exp_strm.adb, exp_util.adb, freeze.adb,
g-debpoo.ads, opt.ads, par-ch12.adb, par-ch2.adb, par-ch3.adb,
par-ch5.adb, par-ch6.adb, sem_aggr.adb, sem_attr.adb, sem_cat.adb,
sem_ch10.adb, sem_ch12.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb,
sem_ch6.adb, sem_intr.adb, sem_res.ads, sem_type.adb, sem_util.adb,
s-regpat.adb, s-tpopde-vms.ads: Minor reformatting.
* s-osinte-freebsd.ads: Fix for tasking failures on FreeBSD.
2011-10-06 Ed Schonberg <schonberg@adacore.com>
* a-cihase.adb, a-ciorma.adb: Avoid accessibility checks in container
references.
2011-10-06 Matthew Heaney <heaney@adacore.com>
* a-cuprqu.ads, a-cuprqu.adb, a-cbprqu.ads, a-cbprqu.adb
(Dequeue_Only_High_Priority): Protected procedure now implemented.
2011-10-06 Vincent Celier <celier@adacore.com>
* g-trasym.adb: Replace old implementation with the default
implementation that returns list of addresses as "0x...".
* g-trasym.ads: Update the list of platforms with the full
capability. Indicate that there is a default implementation
for other platforms.
* g-trasym-unimplemented.ads, g-trasym-unimplemented.adb: Remove.
* gcc-interface/Makefile.in: Remove g-trasym-unimplemented, as there
is now a default implementation for all platforms without the full
capability.
From-SVN: r179631
2011-10-06 Robert Dewar <dewar@adacore.com>
* a-ciorse.adb, a-cihase.adb, a-cihase.ads, a-coorse.adb,
a-cborse.adb, a-comutr.adb, a-ciorma.adb, a-cbmutr.adb,
a-cbmutr.ads, a-cbhase.adb, a-cbhase.ads: Minor reformatting and code
reorganization (use conditional expressions).
2011-10-06 Robert Dewar <dewar@adacore.com>
* sem_res.adb (Resolve_Arithmetic_Op): Fix bad warning for
floating divide by zero.
2011-10-06 Ed Schonberg <schonberg@adacore.com>
* sem_ch6.adb: Limited interfaces that are not immutably limited
are OK in return statements.
From-SVN: r179629
* config/sparc/sparc.md (popcount<mode>2, clz<mode>2): Split up into...
(popcountdi2, popcountsi2, clzdi2, clzsi2): Explicit expanders, in the
SI mode 64-bit code gen case explicitly zero-extend and truncate.
(*popcount<mode>_sp64): Split up into...
(*popcountdi_sp64, *popcountsi_64): Explicit instantiations, and in the
SImode case use truncate.
(*clzsi_sp64): Rewrite to use truncate, and let the expander emit the
subtract so the compiler can optimize it.
(SIDI): Remove unused mode iterator.
From-SVN: r179628
* function.c (thread_prologue_and_epilogue_insns): Emit split
prologue on the orig_entry_edge. Don't account for it in
prologue_clobbered.
From-SVN: r179627
PR tree-optimization/50596
* tree-vectorizer.h (vect_is_simple_cond): New prototype.
(NUM_PATTERNS): Change to 6.
* tree-vect-patterns.c (vect_recog_mixed_size_cond_pattern): New
function.
(vect_vect_recog_func_ptrs): Add vect_recog_mixed_size_cond_pattern.
(vect_mark_pattern_stmts): Don't create stmt_vinfo for def_stmt
if it already has one, and don't set STMT_VINFO_VECTYPE in it
if it is already set.
* tree-vect-stmts.c (vect_mark_stmts_to_be_vectorized): Handle
COND_EXPR in pattern stmts.
(vect_is_simple_cond): No longer static.
* lib/target-supports.exp (check_effective_target_vect_cond_mixed):
New.
* gcc.dg/vect/vect-cond-8.c: New test.
From-SVN: r179626
* tree-vect-patterns.c (vect_pattern_recog_1): Use
vect_recog_func_ptr typedef for the first argument.
(vect_pattern_recog): Rename vect_recog_func_ptr variable
to vect_recog_func, use vect_recog_func_ptr typedef for it.
From-SVN: r179621
* function.c (thread_prologue_and_epilogue_insns): Build a vector
of unconverted simple return blocks rather than trying to
recompute them later based on bb_flags bitmap tests.
From-SVN: r179619
* tree-vect-patterns.c (vect_handle_widen_mult_by_const): For lhs
don't set SSA_NAME_DEF_STMT that has been already set by
gimple_build_assign_with_ops.
(vect_recog_pow_pattern, vect_recog_widen_sum_pattern,
vect_operation_fits_smaller_type, vect_recog_over_widening_pattern):
Likewise.
From-SVN: r179615
* tree.h (avoid_folding_inline_builtin): New prototype.
* builtins.c (avoid_folding_inline_builtin): No longer static.
* gimple-fold.c (gimple_fold_builtin): Give up if
avoid_folding_inline_builtin returns true.
From-SVN: r179614
gcc/
PR target/50305
* config/arm/arm.c (arm_legitimize_reload_address): Recognize
output of a previous pass through legitimize_reload_address.
Do not attempt to optimize addresses if the base register is
equivalent to a constant.
gcc/testsuite/
PR target/50305
* gcc.target/arm/pr50305.c: New test.
From-SVN: r179603
2011-10-06 Andreas Krebbel <Andreas.Krebbel@de.ibm.com>
* function.c (thread_prologue_and_epilogue_insns): Mark
last_bb_active as possibly unused. It is unused for targets which
do neither have "return" nor "simple_return" expanders.
From-SVN: r179601