Fix selective scheduling failures on power6 [2/3]
Andrey Belevantsev
abel@ispras.ru
Mon Sep 29 16:43:00 GMT 2008
Hello,
This patch fixes quite rare situation when can_issue_more variable
retains incorrect value while switching between the fences. It is not
initialized to issue_rate only when the fence to which we are switching
schedules a USE or something similar with INSN_CODE < 0. This leads to
ICE when we try to issue more insns than possible. Fixed by saving
can_issue_more with other fence-dependent data and restored when
starting scheduling on a fence.
The test is reduced from apsi, and I have the same licensing concerns
about it.
OK for trunk?
Andrey
2008-09-29 Andrey Belevantsev <abel@ispras.ru>
* 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.
* sel-sched-ir.h (struct _fence): New field issue_more.
(FENCE_ISSUE_MORE): New accessor macro.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: fix-can-issue-more.diff
Type: text/x-patch
Size: 10999 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20080929/5cc3b20c/attachment.bin>
More information about the Gcc-patches
mailing list