This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [patch][graphite] Fix flags set by split_block


On Tue, 21 Oct 2008, Sebastian Pop wrote:

> Hi,
> 
> The following bug occurs at least 7 times in spec2k6:
> 
> 959.c:28: error: edge from 17 to 57 should be marked irreducible
> 959.c:28: error: basic block 57 should be marked irreducible
> 959.c:28: error: edge from 34 to 53 should be marked irreducible
> 959.c:28: error: basic block 53 should be marked irreducible
> 
> split_block_after_labels does not correctly update the flags for the
> edges and bbs it creates.  Is this patch correct, or should these
> flags be set by split_block instead?

I think split_block should do this instead (after all, split_edge
does).  But Zdenek may know better?

Richard.
 
> 	* graphite.c (create_single_entry_edge): Set
>         EDGE_IRREDUCIBLE_LOOP and BB_IRREDUCIBLE_LOOP.
> 
> Index: graphite.c
> ===================================================================
> --- graphite.c	(revision 141245)
> +++ graphite.c	(working copy)
> @@ -1636,7 +1636,19 @@ create_single_entry_edge (sd_region *reg
>  			 loop_latch_edge (region->entry->loop_father)->src,
>  			 region->exit))
>      {
> +      edge e = single_succ_edge (region->entry);
> +      int e_flags = e->flags;
> +      int b_flags = region->entry->flags;
> +      bool irreducible_e = e_flags & EDGE_IRREDUCIBLE_LOOP;
> +      bool irreducible_b = region->entry->flags & BB_IRREDUCIBLE_LOOP;
>        edge forwarder = split_block_after_labels (region->entry);
> +
> +      if (irreducible_e)
> +	forwarder->flags = e_flags;
> +
> +      if (irreducible_b)
> +	forwarder->dest->flags = b_flags;
> +
>        region->entry = forwarder->dest;
>      }
>    else
> 
> 

-- 
Richard Guenther <rguenther@suse.de>
Novell / SUSE Labs
SUSE LINUX Products GmbH - Nuernberg - AG Nuernberg - HRB 16746 - GF: Markus Rex


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]