public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "rguenth at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug tree-optimization/55334] [4.8 Regression] mgrid regression (ipa-cp disables vectorization)
Date: Mon, 10 Dec 2012 15:34:00 -0000	[thread overview]
Message-ID: <bug-55334-4-0U2dzQTPnv@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-55334-4@http.gcc.gnu.org/bugzilla/>


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55334

--- Comment #15 from Richard Biener <rguenth at gcc dot gnu.org> 2012-12-10 15:33:38 UTC ---
(In reply to comment #4)
> Hmm, this does not help.  The problem is indeed that we are not able to figure
> out that the accesses into subarrays of X are mutually independent.
> 
> Martin, Michael, I think you are more familiar with MEM_REF, can you take a
> look?

Well, the accesses are lowered to like

(compute_affine_dependence
  stmt_a: _21 = MEM[(real(kind=8)[0:D.1986] *)&x + 20247552B][_20];
  stmt_b: _23 = MEM[(real(kind=8)[0:D.1983] *)&x][_20];
) -> dependence analysis failed

this lowering of &x.u vs. &x.v (just guessing) does't mix well with
array-based accesses.  That is, we cannot translate this kind of accesses
to independently indexed dimensions as dependence analysis likes to have.
Another issue is that the number of iterations is not constant but

190: === get_loop_niters ===Analyzing # of iterations of loop 2
  exit condition [2, + , 1](no_overflow) != _2 + -1
  bounds on difference of bases: 0 ... 2147483644
  result:
    # of iterations (unsigned int) _2 + 4294967293, bounded by 2147483644

so we cannot see that in the above case _20 would not run over to the
"other" sub-array of x.

The only way to retain this knowledge is not to lower the high-level form
&x.u and &x.v but to keep it (which in the end won't help because we
cannot reconstruct x.u[_20] or x.v[_20] in any valid way).  Or to
retain restrict information - which means _not_ doing IPA-CP.

So, if you can from

(compute_affine_dependence
  stmt_a: _21 = MEM[(real(kind=8)[0:D.1986] *)&x + 20247552B][_20];
  stmt_b: _23 = MEM[(real(kind=8)[0:D.1983] *)&x][_20];
) -> dependence analysis failed

prove that the base addresses (MEM[(real(kind=8)[0:D.1986] *)&x + 20247552B]
and MEM[(real(kind=8)[0:D.1983] *)&x]) are different objects then
initialize_data_dependence_relation can compute the dependence and all
would be fine.  refs_may_alias_p would be the thing to fix to make
them not alias (as you can see the arrays have unknown upper bounds,
so it's not possible to prove they are not the same).


  parent reply	other threads:[~2012-12-10 15:34 UTC|newest]

Thread overview: 52+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-11-15  2:27 [Bug tree-optimization/55334] New: " hubicka at gcc dot gnu.org
2012-11-15  7:11 ` [Bug tree-optimization/55334] " vincenzo.innocente at cern dot ch
2012-11-15 11:07 ` hubicka at gcc dot gnu.org
2012-11-15 11:42 ` hubicka at gcc dot gnu.org
2012-11-16 10:39 ` hubicka at gcc dot gnu.org
2012-11-16 10:56 ` vincenzo.innocente at cern dot ch
2012-11-16 12:06 ` jakub at gcc dot gnu.org
2012-11-16 13:20 ` hubicka at gcc dot gnu.org
2012-11-16 13:22 ` hubicka at gcc dot gnu.org
2012-11-16 13:29 ` jakub at gcc dot gnu.org
2012-11-16 13:46 ` vincenzo.innocente at cern dot ch
2012-11-16 13:56 ` jakub at gcc dot gnu.org
2012-11-16 13:59 ` vincenzo.innocente at cern dot ch
2012-11-16 14:17 ` jakub at gcc dot gnu.org
2012-11-16 14:45 ` [Bug tree-optimization/55334] [4.8 Regression] " jakub at gcc dot gnu.org
2012-12-07 10:12 ` rguenth at gcc dot gnu.org
2012-12-10 15:34 ` rguenth at gcc dot gnu.org [this message]
2012-12-21 12:26 ` rguenth at gcc dot gnu.org
2012-12-21 13:49 ` hubicka at ucw dot cz
2012-12-21 14:02 ` rguenth at gcc dot gnu.org
2012-12-21 14:09 ` rguenth at gcc dot gnu.org
2012-12-21 14:10 ` jakub at gcc dot gnu.org
2012-12-21 14:12 ` rguenth at gcc dot gnu.org
2012-12-21 14:22 ` hubicka at ucw dot cz
2012-12-21 14:27 ` rguenth at gcc dot gnu.org
2013-02-12 20:11 ` jamborm at gcc dot gnu.org
2013-02-13  9:09 ` rguenth at gcc dot gnu.org
2013-02-19 12:55 ` jamborm at gcc dot gnu.org
2013-02-19 13:50 ` rguenther at suse dot de
2013-02-20 11:13 ` jamborm at gcc dot gnu.org
2013-02-20 12:57 ` jamborm at gcc dot gnu.org
2013-02-20 14:08 ` [Bug tree-optimization/55334] [4.8/4.9 " rguenth at gcc dot gnu.org
2013-03-28 12:36 ` jamborm at gcc dot gnu.org
2013-07-10 23:54 ` chris_s_jones at yahoo dot com
2013-07-24 15:47 ` jamborm at gcc dot gnu.org
2013-07-25 16:33 ` hubicka at ucw dot cz
2014-04-22 11:38 ` [Bug tree-optimization/55334] [4.8/4.9/4.10 " jakub at gcc dot gnu.org
2014-07-16 13:30 ` jakub at gcc dot gnu.org
2014-09-02 15:45 ` [Bug tree-optimization/55334] [4.8/4.9/5 " vp at gcc dot gnu.org
2014-09-03 10:04 ` jamborm at gcc dot gnu.org
2014-09-03 10:25 ` rguenther at suse dot de
2014-09-03 14:11 ` rguenth at gcc dot gnu.org
2014-09-05 12:41 ` rguenth at gcc dot gnu.org
2014-10-30 10:43 ` jakub at gcc dot gnu.org
2014-11-24  9:25 ` [Bug tree-optimization/55334] [4.8/4.9 " rguenth at gcc dot gnu.org
2014-11-24  9:25 ` [Bug tree-optimization/55334] [4.8/4.9/5 " rguenth at gcc dot gnu.org
2014-11-24  9:25 ` rguenth at gcc dot gnu.org
2015-02-16 11:26 ` [Bug tree-optimization/55334] [4.8/4.9 " andrew.n.senkevich at gmail dot com
2015-02-16 11:29 ` jakub at gcc dot gnu.org
2015-02-16 12:17 ` rguenther at suse dot de
2015-06-26 20:01 ` [Bug tree-optimization/55334] [4.9 " jakub at gcc dot gnu.org
2015-06-26 20:31 ` jakub at gcc dot gnu.org

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=bug-55334-4-0U2dzQTPnv@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /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).