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; 8+ 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] 8+ 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; 8+ 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] 8+ 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; 8+ 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] 8+ 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; 8+ 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] 8+ messages in thread

* [Bug tree-optimization/23659] Should able to add dereferencing (statements with VUSE) without rerunning may_alias
       [not found] <bug-23659-4@http.gcc.gnu.org/bugzilla/>
@ 2021-05-04 12:04 ` rguenth at gcc dot gnu.org
  0 siblings, 0 replies; 8+ messages in thread
From: rguenth at gcc dot gnu.org @ 2021-05-04 12:04 UTC (permalink / raw)
  To: gcc-bugs

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

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |FIXED
             Status|ASSIGNED                    |RESOLVED

--- Comment #6 from Richard Biener <rguenth at gcc dot gnu.org> ---
Fixed a long time ago.

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

* [Bug tree-optimization/23659] Should able to add dereferencing (statements with VUSE) without rerunning may_alias
       [not found] <bug-23659-6528@http.gcc.gnu.org/bugzilla/>
  2005-11-12  5:32 ` pinskia at gcc dot gnu dot org
  2006-03-01 12:10 ` rakdver at gcc dot gnu dot org
@ 2006-03-01 14:30 ` dnovillo at gcc dot gnu dot org
  2 siblings, 0 replies; 8+ messages in thread
From: dnovillo at gcc dot gnu dot org @ 2006-03-01 14:30 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #5 from dnovillo at gcc dot gnu dot org  2006-03-01 14:30 -------
(In reply to comment #4)

> are you still working on this PR?
> 
Yes.  In fact, it's one of the kind of manipulations that drove the design
decisions in memory SSA.

> I think something similar to the attached patch should fix the problem -- it
> makes us remember alias class --> TMT mapping globally, and uses it to set up
> TMT's for the new pointers.  Could you please comment on whether you consider
> this the right approach, or propose an alternative one?
> 
Whenever a new pointer symbol is introduced, it should receive a type tag. 
This type tag is then assigned a set of aliases (or not, depending on context).
 In fact, my plan is for these manually added type tags to be marked so that
subsequent alias passes don't affect them.  This should help the vectorizer and
other passes introduce a pointer symbol with a specific set of points-to
aliases that the aliaser may not have a chance of compute so accurately
otherwise.

> On a side note, things like this might become even more difficult with the new
> memory ssa approach.
> 
Huh.  What makes you think that?


-- 


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


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

* [Bug tree-optimization/23659] Should able to add dereferencing (statements with VUSE) without rerunning may_alias
       [not found] <bug-23659-6528@http.gcc.gnu.org/bugzilla/>
  2005-11-12  5:32 ` pinskia at gcc dot gnu dot org
@ 2006-03-01 12:10 ` rakdver at gcc dot gnu dot org
  2006-03-01 14:30 ` dnovillo at gcc dot gnu dot org
  2 siblings, 0 replies; 8+ messages in thread
From: rakdver at gcc dot gnu dot org @ 2006-03-01 12:10 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #4 from rakdver at gcc dot gnu dot org  2006-03-01 12:10 -------
Created an attachment (id=10944)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=10944&action=view)
Possible patch

(In reply to comment #2)
> Working on it.
> 

are you still working on this PR?

I think something similar to the attached patch should fix the problem -- it
makes us remember alias class --> TMT mapping globally, and uses it to set up
TMT's for the new pointers.  Could you please comment on whether you consider
this the right approach, or propose an alternative one?

On a side note, things like this might become even more difficult with the new
memory ssa approach.


-- 


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


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

* [Bug tree-optimization/23659] Should able to add dereferencing (statements with VUSE) without rerunning may_alias
       [not found] <bug-23659-6528@http.gcc.gnu.org/bugzilla/>
@ 2005-11-12  5:32 ` pinskia at gcc dot gnu dot org
  2006-03-01 12:10 ` rakdver at gcc dot gnu dot org
  2006-03-01 14:30 ` dnovillo at gcc dot gnu dot org
  2 siblings, 0 replies; 8+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-11-12  5:32 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from pinskia at gcc dot gnu dot org  2005-11-12 05:32 -------
This should remove the need to change may_alias to a TODO (PR 23330).


-- 

pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
OtherBugsDependingO|                            |23330
              nThis|                            |


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


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

end of thread, other threads:[~2021-05-04 12:04 UTC | newest]

Thread overview: 8+ 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
     [not found] <bug-23659-6528@http.gcc.gnu.org/bugzilla/>
2005-11-12  5:32 ` pinskia at gcc dot gnu dot org
2006-03-01 12:10 ` rakdver at gcc dot gnu dot org
2006-03-01 14:30 ` dnovillo at gcc dot gnu dot org
     [not found] <bug-23659-4@http.gcc.gnu.org/bugzilla/>
2021-05-04 12:04 ` rguenth at gcc dot gnu.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).