[Bug tree-optimization/96565] Failure to optimize out VLA even though it is left unused

2020-08-27 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96565 Richard Biener changed: What|Removed |Added Resolution|--- |FIXED Status|ASSIGNED

[Bug tree-optimization/96565] Failure to optimize out VLA even though it is left unused

2020-08-27 Thread cvs-commit at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96565 --- Comment #11 from CVS Commits --- The master branch has been updated by Richard Biener : https://gcc.gnu.org/g:989bc4ca2f2978baecff00f6d0532994b82897ef commit r11-2899-g989bc4ca2f2978baecff00f6d0532994b82897ef Author: Richard Biener Date:

[Bug tree-optimization/96565] Failure to optimize out VLA even though it is left unused

2020-08-26 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96565 --- Comment #10 from Richard Biener --- Ah, no - error in my patch.

[Bug tree-optimization/96565] Failure to optimize out VLA even though it is left unused

2020-08-26 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96565 --- Comment #9 from Richard Biener --- OK, well - but the fix exposes (IIRC I ran into this at some time in the past already) that GIMPLE_RESX does not have virtual operands but it needs to represent a use of global memory at least in the case

[Bug tree-optimization/96565] Failure to optimize out VLA even though it is left unused

2020-08-26 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96565 Richard Biener changed: What|Removed |Added Assignee|unassigned at gcc dot gnu.org |rguenth at gcc dot gnu.org

[Bug tree-optimization/96565] Failure to optimize out VLA even though it is left unused

2020-08-26 Thread rguenther at suse dot de
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96565 --- Comment #7 from rguenther at suse dot de --- On Tue, 25 Aug 2020, jakub at gcc dot gnu.org wrote: > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96565 > > --- Comment #5 from Jakub Jelinek --- > Wouldn't many spots in the middle-end be

[Bug tree-optimization/96565] Failure to optimize out VLA even though it is left unused

2020-08-25 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96565 --- Comment #6 from Jakub Jelinek --- I'd say that the VLAs are more like "malloc" with the stack restore than performing one or more "free" conceptually, so perhaps we should instead emit calls to free-like internal function .FREE_VLA (ptr);

[Bug tree-optimization/96565] Failure to optimize out VLA even though it is left unused

2020-08-25 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96565 --- Comment #5 from Jakub Jelinek --- Wouldn't many spots in the middle-end be upset about the gimple clobber having a variable length type (both the MEM_REF on the lhs and corresponding type on the CONSTRUCTOR)? I think tree DCE should have

[Bug tree-optimization/96565] Failure to optimize out VLA even though it is left unused

2020-08-25 Thread glisse at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96565 --- Comment #4 from Marc Glisse --- (In reply to Richard Biener from comment #3) > I guess the "usual" way of dealing with this would be to have > CLOBBERs for all VLAs before the __builtin_stack_restore. That looks like a good idea. I didn't

[Bug tree-optimization/96565] Failure to optimize out VLA even though it is left unused

2020-08-25 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96565 Richard Biener changed: What|Removed |Added Keywords||missed-optimization

[Bug tree-optimization/96565] Failure to optimize out VLA even though it is left unused

2020-08-11 Thread glisse at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96565 --- Comment #2 from Marc Glisse --- Actually, it isn't so much the alloca call itself, it seems to be __builtin_stack_save / __builtin_stack_restore that prevent DSE from removing arr[0] = 0 (without that write, DCE can remove

[Bug tree-optimization/96565] Failure to optimize out VLA even though it is left unused

2020-08-11 Thread glisse at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96565 Marc Glisse changed: What|Removed |Added Ever confirmed|0 |1 Status|UNCONFIRMED