public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug middle-end/35356]  New: Missing Index splitting support in  gcc
@ 2008-02-25  4:55 xinliangli at gmail dot com
  2008-02-25 11:53 ` [Bug tree-optimization/35356] " rguenth at gcc dot gnu dot org
  2009-07-21 16:31 ` spop at gcc dot gnu dot org
  0 siblings, 2 replies; 3+ messages in thread
From: xinliangli at gmail dot com @ 2008-02-25  4:55 UTC (permalink / raw)
  To: gcc-bugs

The following cases are not handled by gcc:

case 1:
Example 28:  search loop -- yes it is silly, but exists in real program:

  for (i = 0; i < n; i++)
  {
      if ( i == k)
          a[i] = ...
  }

Should eliminate the loop and generate:

if (k >= 0 && k < n)
    a[k] = ....


case 2:

  for (i = 0; i < n; i++)
  {
       if (i == k)
          a[i] = 1;
       else 
          a[i] = i;
  }

Should be converted into:
  for (i = 0; i < min (n, k); i++)
     a[i] = i;
  if (k >= 0 && k < n)
     a[k] = 1;
  for (i = max(k+1,0); i < n; i++)
     a[i] = i;


case 3 (similar to case 1): (from art)

int winner,numf1s,numf2s, resonant,cp,numpatterns;
double **tds;
double d, tsum;
typedef struct {
      double y;
      int   reset;
      } xyz;

xyz *Y;
int ti;

void match()
{
  int tj,tresult;
  for (tj=0;tj<numf2s;tj++)
    {
      if ((tj == winner) &&(Y[tj].y > 0))
        tsum += tds[ti][tj] * d;
    }
}


-- 
           Summary: Missing Index splitting support in  gcc
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: middle-end
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: xinliangli at gmail dot com


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


^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Bug tree-optimization/35356] Missing Index splitting support in  gcc
  2008-02-25  4:55 [Bug middle-end/35356] New: Missing Index splitting support in gcc xinliangli at gmail dot com
@ 2008-02-25 11:53 ` rguenth at gcc dot gnu dot org
  2009-07-21 16:31 ` spop at gcc dot gnu dot org
  1 sibling, 0 replies; 3+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2008-02-25 11:53 UTC (permalink / raw)
  To: gcc-bugs



-- 

rguenth at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |rakdver at gcc dot gnu dot
                   |                            |org, spop at gcc dot gnu dot
                   |                            |org
           Severity|normal                      |enhancement
          Component|middle-end                  |tree-optimization
           Keywords|                            |missed-optimization
            Version|unknown                     |4.3.0


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


^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Bug tree-optimization/35356] Missing Index splitting support in  gcc
  2008-02-25  4:55 [Bug middle-end/35356] New: Missing Index splitting support in gcc xinliangli at gmail dot com
  2008-02-25 11:53 ` [Bug tree-optimization/35356] " rguenth at gcc dot gnu dot org
@ 2009-07-21 16:31 ` spop at gcc dot gnu dot org
  1 sibling, 0 replies; 3+ messages in thread
From: spop at gcc dot gnu dot org @ 2009-07-21 16:31 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from spop at gcc dot gnu dot org  2009-07-21 16:31 -------
Hi,

Cases 1 and 2 are transformed as asked by -fgraphite-identity.

Case 3 is not recognized by graphite because there is a condition
that depends on a data reference.  This will be fixed in a future
version of Graphite that handles these conditions as predicates.
See 
http://gcc.gnu.org/wiki/Graphite_Workshop_Nov08?action=AttachFile&do=view&target=graphite_irregular_cf.pdf

I added the 3 testcases to the graphite testsuite, case 3 is XFAILed.

Sebastian


-- 

spop at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|0                           |1
   Last reconfirmed|0000-00-00 00:00:00         |2009-07-21 16:31:37
               date|                            |


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


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2009-07-21 16:31 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-02-25  4:55 [Bug middle-end/35356] New: Missing Index splitting support in gcc xinliangli at gmail dot com
2008-02-25 11:53 ` [Bug tree-optimization/35356] " rguenth at gcc dot gnu dot org
2009-07-21 16:31 ` spop at gcc dot gnu dot org

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).