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
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=19831
Richard Biener changed:
What|Removed |Added
Status|ASSIGNED|NEW
Assignee|rguenth at gcc d
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=19831
Sam James changed:
What|Removed |Added
CC||hubicka at gcc dot gnu.org
Keyword
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
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.
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
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 * __
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
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
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
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19831
Andrew Pinski changed:
What|Removed |Added
CC||xinliangli at gmail dot com
--- Comment #
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19831
xiaoyuanbo changed:
What|Removed |Added
CC||xiaoyuanbo at yeah dot net
--- Comment #12 f
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.
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
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
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 ...
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19831
Richard Guenther changed:
What|Removed |Added
Status|NEW |ASSIGNED
AssignedTo|unassigned
--- 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
--- 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/
--- 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
--- 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
--- 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
--
What|Removed |Added
Status|UNCONFIRMED |NEW
Ever Confirmed||1
Last reconfirmed|-00-00 00:00:00 |2005-02-
--- 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
24 matches
Mail list logo