backport: re PR rtl-optimization/42389 (ICE in advance_state_on_fence with sel-schd for 175.vpr)
Backport from mainline:
PR rtl-optimization/42389
* sel-sched.c (advance_one_cycle): Set FENCE_ISSUE_MORE
to can_issue_more.
(advance_state_on_fence): Likewise.
(sel_target_adjust_priority): Print debug output only when
sched_verbose >= 4, not 2.
(get_expr_cost): Do not issue all unique insns on the next cycle.
(fill_insns): Initialize can_issue_more from the value saved
with the fence.
* sel-sched-ir.c (flist_add): New parameter issue_more.
Init FENCE_ISSUE_MORE with it.
(merge_fences): Likewise.
(init_fences): Update call to flist_add.
(add_to_fences, add_clean_fence_to_fences)
(add_dirty_fence_to_fences): Likewise.
(move_fence_to_fences): Update call to merge_fences.
(invoke_reorder_hooks): Do not reset can_issue_more on insns from
sched groups.
* sel-sched-ir.h (struct _fence): New field issue_more.
(FENCE_ISSUE_MORE): New accessor macro.
backport: re PR rtl-optimization/42388 (ICE in move_bb_info with sel-sched and modulo-sched for 176.gcc)
Backport from mainline:
PR rtl-optimization/42388
* sel-sched-ir.c (maybe_tidy_empty_bb): Do not delete empty blocks
that have no predecessors nor successors. Do not call move_bb_info
for empty blocks outside of current region.
backport: re PR rtl-optimization/39453 (ICE : in init_seqno, at sel-sched.c:6433)
Backport from mainline:
2010-01-14 Alexander Monakov <amonakov@ispras.ru>
PR rtl-optimization/39453
PR rtl-optimization/42246
* sel-sched-ir.c (considered_for_pipelining_p): Do not test
for pipelining_p.
(sel_add_loop_preheaders): Add preheader to last_added_blocks.
backport: re PR middle-end/42245 (ICE in verify_backedges for 197.parser with sel-sched)
Backport from mainline:
2010-01-14 Andrey Belevantsev <abel@ispras.ru>
Alexander Monakov <amonakov@ispras.ru>
PR middle-end/42245
* sel-sched-ir.c (sel_recompute_toporder): New. Use it...
(maybe_tidy_empty_bb): ... here. Make static. Add new
argument. Update all callers.
(tidy_control_flow): ... and here. Recompute topological order
of basic blocks in region if necessary.
(sel_redirect_edge_and_branch): Change return type. Return true
if topological order might have been invalidated.
(purge_empty_blocks): Export and move from...
* sel-sched.c (purge_empty_blocks): ... here.
* sel-sched-ir.h (sel_redirect_edge_and_branch): Update prototype.
(maybe_tidy_empty_bb): Delete prototype.
(purge_empty_blocks): Declare.
backport: re PR rtl-optimization/42294 (ICE in code_motion_path_driver for 416.gamess)
Backport from mainline:
PR rtl-optimization/42294
* sel-sched.c (try_replace_dest_reg): When chosen register
and original register is the same, do not bail out early, but
still check all original insns for validity of replacing destination
register. Set EXPR_TARGET_AVAILABLE to 1 before leaving function
in this case.
backport: re PR rtl-optimization/41697 (ICE on gcc.c-torture/compile/20090917-1.c)
Backport from mainline:
PR rtl-optimization/41697
* sel-sched-ir.c (fallthru_bb_of_jump): Bail out when a block with
a conditional jump has a single successor.
backport: sched-deps.c (init_deps): New parameter lazy_reg_last.
Backport from mainline:
2009-11-13 Andrey Belevantsev <abel@ispras.ru>
* sched-deps.c (init_deps): New parameter lazy_reg_last. Don't
allocate reg_last when in case lazy_reg_last is true.
(init_deps_reg_last): New.
(free_deps): When max_reg is 0, this context is already freed.
* sched-int.h (init_deps_reg_last): Export.
(init_deps): Update prototype.
* sched-ebb.c (schedule_ebb): Update the call to init_deps.
* sched-rgn.c (sched_rgn_compute_dependencies): Likewise.
* ddg.c (build_intra_loop_deps): Likewise.
* sel-sched-ir.c (copy_deps_context, create_deps_context,
reset_deps_context, deps_init_id): Likewise.
(init_first_time_insn_data): Lazy allocate INSN_DEPS_CONTEXT.
(free_data_for_scheduled_insn): New, break down from ...
(free_first_time_insn_data): ... here.
(has_dependence_p): Allocate reg_last now, when it is needed.
(extend_insn_data): When maximal LUID is big enough, allocate
per-insn data in smaller chunks.
* sel-sched-ir.h (free_data_for_scheduled_insn): Export.
* sel-sched.c (update_seqnos_and_stage): Free INSN_DEPS_CONTEXT
in scheduled insn.
backport: re PR rtl-optimization/40101 (200.sixtrack ICEs in get_seqno_by_preds, at sel-sched-ir.c:3752)
Backport from mainline:
PR rtl-optimization/40101
* sel-sched-ir.c (get_seqno_by_preds): Allow returning negative
seqno. Adjust comment.
* sel-sched.c (find_seqno_for_bookkeeping): Assert that when
inserting bookkeeping before a jump, the jump is not scheduled.
When no positive seqno found, provide a value. Add comment.
2009-04-28 Alexander Monakov <amonakov@ispras.ru>
* gcc.target/ia64/20071210-2.c: New testcase.
gcc/Changelog:
2009-04-28 Alexander Monakov <amonakov@ispras.ru>
* sel-sched-ir.c (maybe_tidy_empty_bb): Do not attempt to delete a
block if there are complex incoming edges.
(sel_merge_blocks): Remove useless assert.
(sel_redirect_edge_and_branch): Check that edge was redirected.
* sel-sched-ir.h (_eligible_successor_edge_p): Remove assert.
(sel_find_rgns): Delete declaration.
* sel-sched.c (purge_empty_blocks): Attempt to remove first block of
the region when it is not a preheader.
2010-08-08 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
PR boehm-gc/34544
* gthr-posix.h (__gthread_start): Delete.
(__gthread_active_init): Use pthread_default_stacksize_np instead of
pthread_create to determine if hpux pthreads are active.
* gthr-posix95.h (__gthread_start): Delete.
(__gthread_active_init): Likewise use pthread_default_stacksize_np.
Steve Ellcey [Tue, 10 Aug 2010 15:40:14 +0000 (15:40 +0000)]
backport: re PR middle-end/41551 (ia64: ICE: in instantiate_virtual_regs_in_insn, at function.c:1630)
2010-08-10 Steve Ellcey <sje@cup.hp.com>
Jakub Jelinek <jakub@redhat.com>
Backport from mainline:
PR middle-end/41551
* function.c (instantiate_virtual_regs_in_insn): Copy to new reg
before forcing mode.
* testsuite/gcc.dg/pr41551.c: New test.
Co-Authored-By: Jakub Jelinek <jakub@redhat.com>
From-SVN: r163072
re PR boehm-gc/34544 (pthread_default_stacksize_np failed.)
PR boehm-gc/34544
* gthr-posix.h (__gthread_start): Delete.
(__gthread_active_init): Use pthread_default_stacksize_np instead of
pthread_create to determine if hpux pthreads are active.
* gthr-posix95.h (__gthread_start): Delete.
(__gthread_active_init): Likewise use pthread_default_stacksize_np.
Mikael Morin [Fri, 6 Aug 2010 17:17:37 +0000 (17:17 +0000)]
re PR fortran/44660 (ICE in resolve_equivalence())
2010-08-06 Mikael Morin <mikael@gcc.gnu.org>
PR fortran/44660
* gfortran.h (gfc_namespace): New field old_equiv.
(gfc_free_equiv_until): New prototype.
* match.c (gfc_free_equiv_until): New, renamed from gfc_free_equiv with
a parameterized stop condition.
(gfc_free_equiv): Use gfc_free_equiv_until.
* parse.c (next_statement): Save equivalence list.
(reject_statement): Restore equivalence list.
Uros Bizjak [Fri, 6 Aug 2010 07:52:04 +0000 (09:52 +0200)]
expmed.c (expand_mult_const): Expand shift into temporary.
2010-08-06 Uros Bizjak <ubizjak@gmail.com>
* expmed.c (expand_mult_const) <case alg_shift>: Expand shift into
temporary. Emit move from temporary to accum, so REG_EQUAL note will
be attached to this insn in correct mode.
2010-08-06 Uros Bizjak <ubizjak@gmail.com>
* config/i386/i386.c (ix86_decompose_address): Check for SI_REG
using REGNO of base_reg directly.
Jakub Jelinek [Thu, 22 Jul 2010 06:46:28 +0000 (08:46 +0200)]
backport: re PR target/44942 (Bug in argument passing of long double)
Backport from mainline
2010-07-16 Jakub Jelinek <jakub@redhat.com>
PR target/44942
* config/i386/i386-protos.h (ix86_function_arg_boundary): Change second
argument to const_tree.
* config/i386/i386.c (function_arg_advance): If padding needs to be
inserted before argument, increment cum->words by number of padding
words as well.
(contains_aligned_value_p): Change argument to const_tree.
(ix86_function_arg_boundary): Change second argument to const_tree.
* gcc.c-torture/execute/pr44942.c: New test.
* gcc.target/i386/pr44942.c: New test.
re PR target/33743 (unwinding through signal frames)
* config/i386/sol2-unwind.h (x86_64_fallback_frame_state): Correct
explanation.
Find ucontext_t * on Solaris 11.
(x86_fallback_frame_state): Handle Solaris 9 multi-threaded pattern.
Handle new Solaris 11 __sighndlr patterns.
Backport from mainline:
2009-10-11 Olivier Hainque <hainque@adacore.com>
Eric Botcazou <ebotcazou@adacore.com>
PR target/33743
* config/i386/sol2.h (MD_UNWIND_SUPPORT): Define.
* config/i386/sol2-unwind.h: New file.
Paul Thomas [Sat, 10 Jul 2010 17:08:48 +0000 (17:08 +0000)]
re PR fortran/44582 (gfortran generates wrong results due to wrong ABI in function with array return)
2010-07-10 Paul Thomas <pault@gcc.gnu.org>
PR fortran/44582
* trans-expr.c (arrayfunc_assign_needs_temporary): New function
to determine if a function assignment can be made without a
temporary.
(gfc_trans_arrayfunc_assign): Move all the conditions that
suppress the direct function call to the above new functon and
call it.
PR fortran/44773
* trans-expr.c (arrayfunc_assign_needs_temporary): No temporary
if the lhs has never been host associated, as well as not being
use associated, a pointer or a target.
* resolve.c (resolve_variable): Mark variables that are host
associated.
* gfortran.h: Add the host_assoc bit to the symbol_attribute
structure.
2010-07-10 Paul Thomas <pault@gcc.gnu.org>
PR fortran/44582
* gfortran.dg/aliasing_array_result_1.f90 : New test.
Jakub Jelinek [Thu, 8 Jul 2010 17:35:32 +0000 (19:35 +0200)]
re PR fortran/44847 (ICE: OpenMP with Collapse clause and CYCLE stmt in loop)
PR fortran/44847
* match.c (match_exit_cycle): Error on EXIT also from collapsed
!$omp do loops. Error on CYCLE to non-innermost collapsed
!$omp do loops.