This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [02/05] Fix PR 63384
- From: Alexander Monakov <amonakov at ispras dot ru>
- To: Andrey Belevantsev <abel at ispras dot ru>
- Cc: GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Mon, 14 Mar 2016 20:13:55 +0300 (MSK)
- Subject: Re: [02/05] Fix PR 63384
- Authentication-results: sourceware.org; auth=none
- References: <d534c458-8456-51f7-2963-5d1faf112ffe at ispras dot ru> <693a88a9-8878-b169-2bcf-f35e3b52c859 at ispras dot ru>
On Mon, 14 Mar 2016, Andrey Belevantsev wrote:
> Here we're looping because we decrease the counter of the insns we still can
> issue on a DEBUG_INSN thus rendering the counter negative. The fix is to not
> count debug insns in the corresponding code. The selective scheduling is
> known to spoil the result of var tracking, but still it is not the reason to
> hang in there.
>
> The toggle option used in the test seems to be the equivalent of just enabling
> var-tracking-assignments which should lead to the same situation; however, if
> specified as is, var-tracking-assignments will be disabled by the
> toplev.c:1460 code. Maybe we also need the same treatment for
> flag_var_tracking_assignments_toggle.
Hm, I've tried running the test by hand, and I don't follow you: it loops with
either -fvta or -fvta-toggle, producing the expected warning; and doesn't loop
with just -fvar-tracking, when VTA is implicitely disabled at toplev.c:1460.
Sorry, I might have misled you about this (off-list), but it seems toplev.c is
actually working as intended here.
> Ok for trunk?
OK with the formatting oddity fixed:
diff --git a/gcc/sel-sched.c b/gcc/sel-sched.c
index c798935..893a3e5 100644
--- a/gcc/sel-sched.c
+++ b/gcc/sel-sched.c
@@ -4249,7 +4249,8 @@ invoke_aftermath_hooks (fence_t fence, rtx_insn *best_insn, int issue_more)
issue_more);
memcpy (FENCE_STATE (fence), curr_state, dfa_state_size);
}
- else if (GET_CODE (PATTERN (best_insn)) != USE
+ else if (! DEBUG_INSN_P (best_insn)
+ && GET_CODE (PATTERN (best_insn)) != USE
&& GET_CODE (PATTERN (best_insn)) != CLOBBER)
issue_more--;
The prevailing style is '!DEBUG_INSN_P' (no space); it's probably better to
use the same indent style (spaces) on the two following lines too.
Thanks.
Alexander