This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug bootstrap/48652] [4.7 Regression] LTO profiledbootstrap failure
- From: "amonakov at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Mon, 18 Apr 2011 17:25:23 +0000
- Subject: [Bug bootstrap/48652] [4.7 Regression] LTO profiledbootstrap failure
- Auto-submitted: auto-generated
- References: <bug-48652-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48652
Alexander Monakov <amonakov at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |ASSIGNED
CC| |abel at gcc dot gnu.org
AssignedTo|unassigned at gcc dot |amonakov at gcc dot gnu.org
|gnu.org |
--- Comment #3 from Alexander Monakov <amonakov at gcc dot gnu.org> 2011-04-18 17:25:06 UTC ---
The logic of the assert is that the only way we can see exprs with non-zero
priority adjustments is by entering that function twice without recomputing av
sets, at which point need_stall would be initialized. However, it seems that
on such occasion we will call the target hook twice as well. While it's
technically not making a big difference (we would not wrongly account the
adjustment twice thanks to the way sel_target_adjust_priority is implemented),
it's better to skip that call when it's useless. I'll test the following
patch.
diff --git a/gcc/sel-sched.c b/gcc/sel-sched.c
index f409c4f..e381419 100644
--- a/gcc/sel-sched.c
+++ b/gcc/sel-sched.c
@@ -3725,7 +3725,12 @@ fill_vec_av_set (av_set_t av, blist_t bnds, fence_t
fence,
{
VEC_safe_push (expr_t, heap, vec_av_set, expr);
- gcc_assert (EXPR_PRIORITY_ADJ (expr) == 0 || *pneed_stall);
+ /* If *pneed_stall is set, we have already adjusted priorities during
+ the previous call to this function. */
+ if (*pneed_stall)
+ continue;
+
+ gcc_assert (EXPR_PRIORITY_ADJ (expr) == 0);
/* Adjust priority using target backend hook. */
sel_target_adjust_priority (expr);
@@ -5522,7 +5527,7 @@ fill_insns (fence_t fence, int seqno, ilist_t
**scheduled_insns_tailpp)
{
blist_t *bnds_tailp1, *bndsp;
expr_t expr_vliw;
- int need_stall;
+ int need_stall = 0;
int was_stall = 0, scheduled_insns = 0;
int max_insns = pipelining_p ? issue_rate : 2 * issue_rate;
int max_stall = pipelining_p ? 1 : 3;