public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/23659] New: Should able to add dereferencing (statements with VUSE) without rerunning may_alias
@ 2005-08-31 17:00 pinskia at gcc dot gnu dot org
  2005-08-31 17:02 ` [Bug tree-optimization/23659] " pinskia at gcc dot gnu dot org
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-08-31 17:00 UTC (permalink / raw)
  To: gcc-bugs

An example of this comes from PR 18298:
extern "C" int strcmp (const char*, const char*);

char s[2048] = "a";

inline bool foo(const char *str) {
  return !strcmp(s,str);
}
int main() {
  while(!(foo(""))) {
    s[0] = '\0';
  }
  return 0;
}

In fab, we replace:
  #   VUSE <s_1>;
  D.1754_4 = strcmp (&s[0], &""[0]);

With   
  D.1777_6 = (const unsigned char *) &s[0];
  D.1778_9 = *D.1777_6;
  D.1779_3 = (int) D.1778_9;
  D.1754_4 = D.1779_3;

And the "  D.1778_9 = *D.1777_6;" statement does not have a VUSE which causes wrong code if we 
have a V_MAY_DEF/V_MUST_DEF above (which happens in the testcase).

The main reason why I am asking this question so that in the tree combiner, I don't want to rerun 
may_alias after each time I run the tree combiner which just becomes too expensive.

An example for the tree combiner would be:
int f(char *a)
{
  int b = strlen(a);
  return b == 0;
}

-- 
           Summary: Should able to add dereferencing (statements with VUSE)
                    without rerunning may_alias
           Product: gcc
           Version: 4.1.0
            Status: UNCONFIRMED
          Severity: enhancement
          Priority: P2
         Component: tree-optimization
        AssignedTo: dnovillo at gcc dot gnu dot org
        ReportedBy: pinskia at gcc dot gnu dot org
                CC: gcc-bugs at gcc dot gnu dot org


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


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

* [Bug tree-optimization/23659] Should able to add dereferencing (statements with VUSE) without rerunning may_alias
  2005-08-31 17:00 [Bug tree-optimization/23659] New: Should able to add dereferencing (statements with VUSE) without rerunning may_alias pinskia at gcc dot gnu dot org
@ 2005-08-31 17:02 ` pinskia at gcc dot gnu dot org
  2005-08-31 21:41 ` steven at gcc dot gnu dot org
  2005-08-31 21:57 ` dnovillo at gcc dot gnu dot org
  2 siblings, 0 replies; 4+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-08-31 17:02 UTC (permalink / raw)
  To: gcc-bugs



-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |ASSIGNED
     Ever Confirmed|                            |1
   Last reconfirmed|0000-00-00 00:00:00         |2005-08-31 17:00:14
               date|                            |


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


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

* [Bug tree-optimization/23659] Should able to add dereferencing (statements with VUSE) without rerunning may_alias
  2005-08-31 17:00 [Bug tree-optimization/23659] New: Should able to add dereferencing (statements with VUSE) without rerunning may_alias pinskia at gcc dot gnu dot org
  2005-08-31 17:02 ` [Bug tree-optimization/23659] " pinskia at gcc dot gnu dot org
@ 2005-08-31 21:41 ` steven at gcc dot gnu dot org
  2005-08-31 21:57 ` dnovillo at gcc dot gnu dot org
  2 siblings, 0 replies; 4+ messages in thread
From: steven at gcc dot gnu dot org @ 2005-08-31 21:41 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From steven at gcc dot gnu dot org  2005-08-31 21:38 -------
Can the alias gurus please give their view on this one? 

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |dberlin at gcc dot gnu dot
                   |                            |org, dnovillo at gcc dot gnu
                   |                            |dot org
           Keywords|                            |alias


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


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

* [Bug tree-optimization/23659] Should able to add dereferencing (statements with VUSE) without rerunning may_alias
  2005-08-31 17:00 [Bug tree-optimization/23659] New: Should able to add dereferencing (statements with VUSE) without rerunning may_alias pinskia at gcc dot gnu dot org
  2005-08-31 17:02 ` [Bug tree-optimization/23659] " pinskia at gcc dot gnu dot org
  2005-08-31 21:41 ` steven at gcc dot gnu dot org
@ 2005-08-31 21:57 ` dnovillo at gcc dot gnu dot org
  2 siblings, 0 replies; 4+ messages in thread
From: dnovillo at gcc dot gnu dot org @ 2005-08-31 21:57 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From dnovillo at gcc dot gnu dot org  2005-08-31 21:41 -------

Working on it.


-- 


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


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

end of thread, other threads:[~2005-08-31 21:41 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-08-31 17:00 [Bug tree-optimization/23659] New: Should able to add dereferencing (statements with VUSE) without rerunning may_alias pinskia at gcc dot gnu dot org
2005-08-31 17:02 ` [Bug tree-optimization/23659] " pinskia at gcc dot gnu dot org
2005-08-31 21:41 ` steven at gcc dot gnu dot org
2005-08-31 21:57 ` dnovillo 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).