[Bug tree-optimization/57742] memset(malloc(n),0,n) -> calloc(n,1)

2015-09-17 Thread daniel.gutson at tallertechnologies dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=57742 Daniel Gutson changed: What|Removed |Added CC||daniel.gutson@tallertechnol

[Bug tree-optimization/57742] memset(malloc(n),0,n) - calloc(n,1)

2014-06-25 Thread Joost.VandeVondele at mat dot ethz.ch
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=57742 --- Comment #17 from Joost VandeVondele Joost.VandeVondele at mat dot ethz.ch --- (In reply to Marc Glisse from comment #16) Done. Joost, feel free to add your testcase from comment #3 if you want to (I can't write a hello world in fortran so

[Bug tree-optimization/57742] memset(malloc(n),0,n) - calloc(n,1)

2014-06-25 Thread Joost.VandeVondele at mat dot ethz.ch
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=57742 Joost VandeVondele Joost.VandeVondele at mat dot ethz.ch changed: What|Removed |Added Status|RESOLVED

[Bug tree-optimization/57742] memset(malloc(n),0,n) - calloc(n,1)

2014-06-25 Thread glisse at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=57742 --- Comment #19 from Marc Glisse glisse at gcc dot gnu.org --- (In reply to Joost VandeVondele from comment #17) Thanks Marc, I don't have write access, but I can try to dg-ify the testcase from comment #3.. however, first test, it still seems

[Bug tree-optimization/57742] memset(malloc(n),0,n) - calloc(n,1)

2014-06-25 Thread glisse at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=57742 --- Comment #20 from Marc Glisse glisse at gcc dot gnu.org --- (In reply to Joost VandeVondele from comment #18) The following now fails, so'll reopen this PR. It is at least related to zeroing pvec twice in a row, and doesn seem to happen if I

[Bug tree-optimization/57742] memset(malloc(n),0,n) - calloc(n,1)

2014-06-25 Thread glisse at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=57742 --- Comment #21 from Marc Glisse glisse at gcc dot gnu.org --- I am testing the following: --- tree-ssa-strlen.c(revision 211967) +++ tree-ssa-strlen.c(working copy) @@ -1646,20 +1646,22 @@ handle_builtin_memset (gimple_stmt_itera

[Bug tree-optimization/57742] memset(malloc(n),0,n) - calloc(n,1)

2014-06-25 Thread glisse at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=57742 --- Comment #22 from Marc Glisse glisse at gcc dot gnu.org --- Author: glisse Date: Wed Jun 25 12:27:13 2014 New Revision: 211977 URL: https://gcc.gnu.org/viewcvs?rev=211977root=gccview=rev Log: 2014-06-25 Marc Glisse marc.gli...@inria.fr

[Bug tree-optimization/57742] memset(malloc(n),0,n) - calloc(n,1)

2014-06-25 Thread glisse at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=57742 Marc Glisse glisse at gcc dot gnu.org changed: What|Removed |Added Status|REOPENED|RESOLVED

[Bug tree-optimization/57742] memset(malloc(n),0,n) - calloc(n,1)

2014-06-24 Thread glisse at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=57742 --- Comment #15 from Marc Glisse glisse at gcc dot gnu.org --- Author: glisse Date: Tue Jun 24 18:50:00 2014 New Revision: 211956 URL: https://gcc.gnu.org/viewcvs?rev=211956root=gccview=rev Log: 2014-06-24 Marc Glisse marc.gli...@inria.fr

[Bug tree-optimization/57742] memset(malloc(n),0,n) - calloc(n,1)

2014-06-24 Thread glisse at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=57742 Marc Glisse glisse at gcc dot gnu.org changed: What|Removed |Added Status|NEW |RESOLVED

[Bug tree-optimization/57742] memset(malloc(n),0,n) - calloc(n,1)

2014-02-23 Thread glisse at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57742 Marc Glisse glisse at gcc dot gnu.org changed: What|Removed |Added Attachment #30981|0 |1 is

[Bug tree-optimization/57742] memset(malloc(n),0,n) - calloc(n,1)

2014-02-22 Thread glisse at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57742 --- Comment #13 from Marc Glisse glisse at gcc dot gnu.org --- (In reply to Richard Biener from comment #12) Yes, the fact that the return value p cannot be equal to q inside the function is not exposable. Richard fixed this in PR 50262, yay!

[Bug tree-optimization/57742] memset(malloc(n),0,n) - calloc(n,1)

2013-10-14 Thread rguenth at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57742 Richard Biener rguenth at gcc dot gnu.org changed: What|Removed |Added Status|UNCONFIRMED |NEW Last

[Bug tree-optimization/57742] memset(malloc(n),0,n) - calloc(n,1)

2013-10-14 Thread Joost.VandeVondele at mat dot ethz.ch
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57742 Joost VandeVondele Joost.VandeVondele at mat dot ethz.ch changed: What|Removed |Added CC|

[Bug tree-optimization/57742] memset(malloc(n),0,n) - calloc(n,1)

2013-10-14 Thread glisse at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57742 --- Comment #4 from Marc Glisse glisse at gcc dot gnu.org --- (In reply to Richard Biener from comment #2) (In reply to Marc Glisse from comment #1) This is a very limited version of this optimization. It is in simplify_builtin_call, so only

[Bug tree-optimization/57742] memset(malloc(n),0,n) - calloc(n,1)

2013-10-14 Thread rguenth at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57742 --- Comment #5 from Richard Biener rguenth at gcc dot gnu.org --- (In reply to Marc Glisse from comment #4) (In reply to Richard Biener from comment #2) (In reply to Marc Glisse from comment #1) This is a very limited version of this

[Bug tree-optimization/57742] memset(malloc(n),0,n) - calloc(n,1)

2013-10-14 Thread glisse at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57742 --- Comment #6 from Marc Glisse glisse at gcc dot gnu.org --- (In reply to Richard Biener from comment #5) We have walk_aliased_vdefs for this. Basically the first callback you receive has to be the malloc, otherwise there is an aliasing stmt

[Bug tree-optimization/57742] memset(malloc(n),0,n) - calloc(n,1)

2013-10-14 Thread glisse at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57742 --- Comment #7 from Marc Glisse glisse at gcc dot gnu.org --- (In reply to Richard Biener from comment #5) We have walk_aliased_vdefs for this. Basically the first callback you receive has to be the malloc, otherwise there is an aliasing stmt

[Bug tree-optimization/57742] memset(malloc(n),0,n) - calloc(n,1)

2013-10-14 Thread glisse at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57742 --- Comment #8 from Marc Glisse glisse at gcc dot gnu.org --- Created attachment 31003 -- http://gcc.gnu.org/bugzilla/attachment.cgi?id=31003action=edit walk_aliased_vdefs experiment Incomplete patch I used for my previous comment.

[Bug tree-optimization/57742] memset(malloc(n),0,n) - calloc(n,1)

2013-10-11 Thread glisse at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57742 --- Comment #1 from Marc Glisse glisse at gcc dot gnu.org --- Created attachment 30981 -- http://gcc.gnu.org/bugzilla/attachment.cgi?id=30981action=edit basic patch This is a very limited version of this optimization. It is in