public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
From: Sebastian Pop <sebastian.pop@cri.ensmp.fr>
To: Daniel Berlin <dberlin@dberlin.org>
Cc: Richard Guenther <rguenth@tat.physik.uni-tuebingen.de>,
	dorit@il.ibm.com, gcc@gcc.gnu.org
Subject: Re: [autovect][PATCH]: Re: Simple loops not interchanged?
Date: Mon, 13 Dec 2004 09:46:00 -0000	[thread overview]
Message-ID: <20041213094007.GA2083@cri.ensmp.fr> (raw)
In-Reply-To: <Pine.LNX.4.60.0412112245340.4629@dberlin.org>

On Sat, Dec 11, 2004 at 10:58:50PM -0500, Daniel Berlin wrote:
>  
> Index: tree-data-ref.c
> ===================================================================
> RCS file: /cvs/gcc/gcc/gcc/tree-data-ref.c,v
> retrieving revision 2.15.4.2
> diff -u -p -r2.15.4.2 tree-data-ref.c
> --- tree-data-ref.c	30 Nov 2004 20:28:38 -0000	2.15.4.2
> +++ tree-data-ref.c	12 Dec 2004 03:47:21 -0000
> @@ -1812,12 +1812,19 @@ analyze_overlapping_iterations (tree chr
>        fprintf (dump_file, ")\n");
>      }
>    
> -  if (chrec_a == NULL_TREE
> -      || chrec_b == NULL_TREE
> -      || chrec_contains_undetermined (chrec_a)
> -      || chrec_contains_undetermined (chrec_b)
> -      || chrec_contains_symbols (chrec_a)
> -      || chrec_contains_symbols (chrec_b))
> +  /* If they are the same chrec, they overlap on every iteration.  */
> +  if (chrec_a == chrec_b)
> +    {
> +      *overlap_iterations_a = integer_zero_node;
> +      *overlap_iterations_b = integer_zero_node;
> +      *last_conflicts = chrec_dont_know;
> +    }  

Are you really sure that you want this behavior?

chrec_a = chrec_dont_know
chrec_b = chrec_dont_know

or even the following: 

chrec_a = {0, +, chrec_dont_know}
chrec_b = {0, +, chrec_dont_know}

results in having determined overlap iterations when the analysis
should have answered "don't know".  The condition is a little too
strong I think.

> +  else if (chrec_a == NULL_TREE
> +	   || chrec_b == NULL_TREE
> +	   || chrec_contains_undetermined (chrec_a)
> +	   || chrec_contains_undetermined (chrec_b)
> +	   || chrec_contains_symbols (chrec_a)
> +	   || chrec_contains_symbols (chrec_b))
>      {
>        dependence_stats.num_unimplemented++;
>        

What you want is something like:

if (chrec_a == NULL_TREE
   || chrec_b == NULL_TREE
   || chrec_contains_undetermined (chrec_a)
   || chrec_contains_undetermined (chrec_b))
{
  undetermined
}
else if (chrec_a == chrec_b
	&& symbols_in_chrec_are_invariant_p (chrec_a))
{
  overlaps every iteration
}
else if (chrec_contains_symbols (chrec_a)
	|| chrec_contains_symbols (chrec_b))
{
  undetermined
}

  parent reply	other threads:[~2004-12-13  9:46 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-12-10 15:36 Richard Guenther
2004-12-10 16:21 ` Andrew Pinski
2004-12-10 16:39   ` Daniel Berlin
2004-12-10 16:34 ` Daniel Berlin
2004-12-12  3:58   ` [autovect][PATCH]: " Daniel Berlin
2004-12-12 17:59     ` Devang Patel
2004-12-12 18:02       ` Daniel Berlin
2004-12-13  9:46     ` Sebastian Pop [this message]
2004-12-12 15:16 Dorit Naishlos

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20041213094007.GA2083@cri.ensmp.fr \
    --to=sebastian.pop@cri.ensmp.fr \
    --cc=dberlin@dberlin.org \
    --cc=dorit@il.ibm.com \
    --cc=gcc@gcc.gnu.org \
    --cc=rguenth@tat.physik.uni-tuebingen.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).