[Bug tree-optimization/19831] Missing DSE/malloc/free optimization

2025-02-24 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=19831 --- Comment #24 from Andrew Pinski --- (In reply to Marc Glisse from comment #16) > Some more transformations for the list: > > p = malloc (n); > memcpy (p, q, m); > free (q); > > ==> > > p = realloc (q, n); > > it isn't equivalent, in partic

[Bug tree-optimization/19831] Missing DSE/malloc/free optimization

2025-02-18 Thread rguenth at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=19831 Richard Biener changed: What|Removed |Added Status|ASSIGNED|NEW Assignee|rguenth at gcc d

[Bug tree-optimization/19831] Missing DSE/malloc/free optimization

2024-10-31 Thread sjames at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=19831 Sam James changed: What|Removed |Added CC||hubicka at gcc dot gnu.org Keyword

[Bug tree-optimization/19831] Missing DSE/malloc/free optimization

2021-06-21 Thread koss.dallas at crm dot leadkahuna.com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=19831 --- Comment #21 from koss.dallas at crm dot leadkahuna.com --- Hello! You can examine a list of the required documents here in one file: xpawel.com/miss-edythe-mccullough/gcc-bugzilla-12.zip -Original Message- On Thursday, 25 March

[Bug tree-optimization/19831] Missing DSE/malloc/free optimization

2021-03-25 Thread rguenth at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=19831 --- Comment #20 from Richard Biener --- The original cases are all fixed but what remains is us failing to elide void f () { void *p = __builtin_malloc (1); if (!p) __builtin_abort (); __builtin_free (p); } if that's even desirable.

[Bug tree-optimization/19831] Missing DSE/malloc/free optimization

2013-10-29 Thread glisse at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19831 --- Comment #19 from Marc Glisse --- Author: glisse Date: Tue Oct 29 13:19:08 2013 New Revision: 204160 URL: http://gcc.gnu.org/viewcvs?rev=204160&root=gcc&view=rev Log: 2013-10-29 Marc Glisse PR tree-optimization/19831 gcc/ * tree-ss

[Bug tree-optimization/19831] Missing DSE/malloc/free optimization

2013-10-29 Thread rguenther at suse dot de
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19831 --- Comment #18 from rguenther at suse dot de --- On Fri, 25 Oct 2013, glisse at gcc dot gnu.org wrote: > http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19831 > > --- Comment #17 from Marc Glisse --- > void f (double * __restrict a) { > int * __

[Bug tree-optimization/19831] Missing DSE/malloc/free optimization

2013-10-25 Thread glisse at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19831 --- Comment #17 from Marc Glisse --- void f (double * __restrict a) { int * __restrict p = (int*) __builtin_malloc (sizeof (int)); *p = 42; __builtin_free (p); ++*a; // Breaks the optimization! } Normally, gcc now manages to remove unused

[Bug tree-optimization/19831] Missing DSE/malloc/free optimization

2013-10-10 Thread glisse at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19831 --- Comment #15 from Marc Glisse --- See the discussion that starts at: http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20130923/188747.html (it continues in the following weeks) for optimization 2 of comment #14 in clang. The key ide

[Bug tree-optimization/19831] Missing DSE/malloc/free optimization

2013-06-01 Thread glisse at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19831 Marc Glisse changed: What|Removed |Added CC||glisse at gcc dot gnu.org --- Comment #14 f

[Bug tree-optimization/19831] Missing DSE/malloc/free optimization

2012-04-22 Thread pinskia at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19831 Andrew Pinski changed: What|Removed |Added CC||xinliangli at gmail dot com --- Comment #

[Bug tree-optimization/19831] Missing DSE/malloc/free optimization

2012-02-22 Thread xiaoyuanbo at yeah dot net
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19831 xiaoyuanbo changed: What|Removed |Added CC||xiaoyuanbo at yeah dot net --- Comment #12 f

[Bug tree-optimization/19831] Missing DSE/malloc/free optimization

2011-09-08 Thread rguenth at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19831 --- Comment #11 from Richard Guenther 2011-09-08 13:05:26 UTC --- More cases handled now. What we still miss is conditional free, see gcc.dg/tree-ssa/pr19831-3.c for XFAILed testcases.

[Bug tree-optimization/19831] Missing DSE/malloc/free optimization

2011-09-08 Thread rguenth at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19831 --- Comment #10 from Richard Guenther 2011-09-08 13:00:32 UTC --- Author: rguenth Date: Thu Sep 8 13:00:23 2011 New Revision: 178687 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=178687 Log: 2011-09-08 Richard Guenther PR tree-o

[Bug tree-optimization/19831] Missing DSE/malloc/free optimization

2011-09-08 Thread rguenth at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19831 --- Comment #9 from Richard Guenther 2011-09-08 09:21:47 UTC --- Author: rguenth Date: Thu Sep 8 09:21:39 2011 New Revision: 178683 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=178683 Log: 2011-09-08 Richard Guenther PR tree-op

[Bug tree-optimization/19831] Missing DSE/malloc/free optimization

2011-09-07 Thread rguenth at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19831 --- Comment #8 from Richard Guenther 2011-09-07 15:04:17 UTC --- Hm, and for invalid code like int main() { int *p = __builtin_malloc (sizeof (int) * 4); *p++ = 4; *p++ = 8; __builtin_free (p); return 0; } we shouldn't ICE either ...

[Bug tree-optimization/19831] Missing DSE/malloc/free optimization

2011-09-07 Thread rguenth at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19831 Richard Guenther changed: What|Removed |Added Status|NEW |ASSIGNED AssignedTo|unassigned

[Bug tree-optimization/19831] Missing DSE/malloc/free optimization

2009-07-01 Thread rguenth at gcc dot gnu dot org
--- Comment #6 from rguenth at gcc dot gnu dot org 2009-07-01 12:28 --- I am not working on the other piece. -- rguenth at gcc dot gnu dot org changed: What|Removed |Added

[Bug tree-optimization/19831] Missing DSE/malloc/free optimization

2009-07-01 Thread rguenth at gcc dot gnu dot org
--- Comment #5 from rguenth at gcc dot gnu dot org 2009-07-01 12:27 --- Subject: Bug 19831 Author: rguenth Date: Wed Jul 1 12:27:33 2009 New Revision: 149140 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=149140 Log: 2009-07-01 Richard Guenther PR tree-optimization/

[Bug tree-optimization/19831] Missing DSE/malloc/free optimization

2009-06-26 Thread rguenth at gcc dot gnu dot org
--- Comment #4 from rguenth at gcc dot gnu dot org 2009-06-26 15:39 --- And we want to optimize void *malloc(__SIZE_TYPE__); void free(void*); void abort(void); int f(void) { char *i = malloc(1); if (i == (void *)0) abort (); *i = 1; free (i); } the same (removing the check

[Bug tree-optimization/19831] Missing DSE/malloc/free optimization

2009-06-26 Thread rguenth at gcc dot gnu dot org
--- Comment #3 from rguenth at gcc dot gnu dot org 2009-06-26 15:23 --- Hm, it's not _that_ simple. A fab hack is easier I guess. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19831

[Bug tree-optimization/19831] Missing DSE/malloc/free optimization

2009-06-26 Thread rguenth at gcc dot gnu dot org
--- Comment #2 from rguenth at gcc dot gnu dot org 2009-06-26 15:12 --- I have a patch for the DSE part. The malloc part shouldn't be too difficult. The free part is more interesting. Basically the pointer use in free (p) should mark the malloc necessary but really nothing is there to

[Bug tree-optimization/19831] Missing DSE/malloc/free optimization

2005-02-08 Thread pinskia at gcc dot gnu dot org
-- What|Removed |Added Status|UNCONFIRMED |NEW Ever Confirmed||1 Last reconfirmed|-00-00 00:00:00 |2005-02-

[Bug tree-optimization/19831] Missing DSE/malloc/free optimization

2005-02-08 Thread dberlin at dberlin dot org
--- Additional Comments From dberlin at gcc dot gnu dot org 2005-02-09 03:42 --- Subject: Re: New: Missing DSE/malloc/free optimization > void *malloc(__SIZE_TYPE__); > void free(void*); > int f(void) > { > char *i = malloc(1); > *i = 1; > free (i); > } > > This is somet