This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Multiple branch delay slot patch
- To: "Michael P. Hayes" <michaelh at ongaonga dot chch dot cri dot nz>
- Subject: Re: Multiple branch delay slot patch
- From: Jeffrey A Law <law at cygnus dot com>
- Date: Sun, 21 Dec 1997 15:48:56 -0700
- cc: Herman ten Brugge <herman at htbrug dot net dot HCC dot nl>, egcs at cygnus dot com
- Reply-To: law at cygnus dot com
In message <199711221105.AAA31847@ongaonga.chch.cri.nz>you write:
> ***************
> *** 1888,1896 ****
> if (! annul_p)
> mark_referenced_resources (next_to_match, &needed, 1);
> }
> !
> ! mark_set_resources (trial, &set, 0, 1);
> ! mark_referenced_resources (trial, &needed, 1);
> }
>
> /* See if we stopped on a filled insn. If we did, try to see if its
> --- 1892,1904 ----
> if (! annul_p)
> mark_referenced_resources (next_to_match, &needed, 1);
> }
> ! else
> ! {
> ! /* We don't mark the resources when we pull them into the delay
> ! slot because their results are ready anyway. */
> ! mark_set_resources (trial, &set, 0, 1);
> ! mark_referenced_resources (trial, &needed, 1);
> ! }
This seems wrong; don't we need a conditional call to mark_set_resources for
the earlier !annul_p case for this code to work?
> delay_list = add_to_delay_list (temp, delay_list);
>
> + mark_set_resources (trial, &opposite_needed, 0, 1);
> +
> if (slots_to_fill == ++(*pslots_filled))
> {
> /* Even though we have filled all the slots, we
Don't you also need to deal with referenced resources here too?
> ***************
> *** 3705,3711 ****
> {
> /* If this is the `true' thread, we will want to follow the jump,
> so we can only do this if we have taken everything up to here. */
> ! if (thread_if_true && trial == new_thread)
> delay_list
> = steal_delay_list_from_target (insn, condition, PATTERN (trial),
> delay_list, &set, &needed,
> --- 3726,3734 ----
> {
> /* If this is the `true' thread, we will want to follow the jump,
> so we can only do this if we have taken everything up to here. */
> ! if (thread_if_true && trial == new_thread
> ! && ! insn_references_resource_p (XVECEXP (PATTERN (trial), 0, 0),
> ! &opposite_needed, 0))
> delay_list
> = steal_delay_list_from_target (insn, condition, PATTERN (trial),
> delay_list, &set, &needed,
Doesn't the code in steal_delay_list_from_target already check that there
isn't a conflict between references in trial insn and the opposite thread?
The rest of the changes look pretty reasonable, so once we nail down the right
thing for these remaining fragments we'll install the changes.
jeff