[Bug tree-optimization/84824] DCE fails to remove dead code of std::function constructor

2018-10-04 Thread egallager at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84824 --- Comment #18 from Eric Gallager --- (In reply to linzj from comment #16) > Created attachment 43783 [details] > This patch trying simulate a local escaped node for function call. > > This patch trying simulate a local escaped node for

[Bug tree-optimization/84824] DCE fails to remove dead code of std::function constructor

2018-03-28 Thread manjian2006 at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84824 --- Comment #17 from linzj --- After this patch the code still have redundant calls for the inline pass has finished. But the indirect function calls has been removed.

[Bug tree-optimization/84824] DCE fails to remove dead code of std::function constructor

2018-03-28 Thread manjian2006 at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84824 --- Comment #16 from linzj --- Created attachment 43783 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=43783=edit This patch trying simulate a local escaped node for function call. This patch trying simulate a local escaped node for

[Bug tree-optimization/84824] DCE fails to remove dead code of std::function constructor

2018-03-20 Thread manjian2006 at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84824 --- Comment #15 from linzj --- The structalias solve_graph is not resolving the nodes reachable from a source node, which make my try fail.

[Bug tree-optimization/84824] DCE fails to remove dead code of std::function constructor

2018-03-16 Thread manjian2006 at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84824 --- Comment #14 from linzj --- I mean call_may_clobber_ref_p_1 function in tree-ssa-alias.c. It does use the clobber set of the call statement. So making the clobber set right should have positive effect on the code, right?

[Bug tree-optimization/84824] DCE fails to remove dead code of std::function constructor

2018-03-16 Thread manjian2006 at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84824 --- Comment #13 from linzj --- But the code looks like only using the clobber set of the call statment. I will look into that.

[Bug tree-optimization/84824] DCE fails to remove dead code of std::function constructor

2018-03-16 Thread rguenther at suse dot de
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84824 --- Comment #12 from rguenther at suse dot de --- On Fri, 16 Mar 2018, manjian2006 at gmail dot com wrote: > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84824 > > --- Comment #11 from linzj --- > This patch makes the printf clobber/use set

[Bug tree-optimization/84824] DCE fails to remove dead code of std::function constructor

2018-03-16 Thread manjian2006 at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84824 --- Comment #11 from linzj --- This patch makes the printf clobber/use set correct. But it doesn't seem like much help. Maybe the escape set only comes from the function wise one.

[Bug tree-optimization/84824] DCE fails to remove dead code of std::function constructor

2018-03-16 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84824 --- Comment #10 from Richard Biener --- (In reply to linzj from comment #8) > Created attachment 43675 [details] > patch to discuss > > This patch aims to make the escape result for call statement accurate. > > But I find the test case still

[Bug tree-optimization/84824] DCE fails to remove dead code of std::function constructor

2018-03-16 Thread manjian2006 at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84824 --- Comment #9 from linzj --- sra may not relate to this problem. I make sra get involved, because fre fails to recognise a mem ref and a component ref are the same reference. Maybe we should work on fre

[Bug tree-optimization/84824] DCE fails to remove dead code of std::function constructor

2018-03-16 Thread manjian2006 at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84824 linzj changed: What|Removed |Added CC||manjian2006 at gmail dot com --- Comment #8

[Bug tree-optimization/84824] DCE fails to remove dead code of std::function constructor

2018-03-15 Thread manjian2006 at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84824 --- Comment #7 from linzj --- The core of this problem is escaped result is function wise, not block wise, or instruction wise. Any place in the function the local variable escapes, will count that variable as escaped. Actually the printf does

[Bug tree-optimization/84824] DCE fails to remove dead code of std::function constructor

2018-03-12 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84824 Richard Biener changed: What|Removed |Added Keywords||alias, missed-optimization