On Fri, 4 Feb 2022, Jakub Jelinek wrote: > On Fri, Feb 04, 2022 at 02:49:13PM +0100, Richard Biener wrote: > > Any comments? I have mixed feelings with proposing this for GCC 12 > > but like to hear from others as well. I didn't try to evaluate > > the quality of stack slot sharing before/after this change besides > > fixing the testsuite fallout (we have a few testcases checking for > > specific instances). > > I have mixed feelings too, it is quite risky, on the other side we have > those numerous otherwise unsolvable PRs.
Yep - it seems it's always stage3/4 when we get to those. That said, I'm happy to wait for stage1 and I'm also happy to revert if issues pop up. > I wonder if tree-ssa-live.cc (compute_live_vars_1) doesn't need similar > changes, after all, it is a variant of the cfgexpand algorithm. Oh, I wasn't aware of that. It seems it's only used by tail-recursion and inlining (there for inserting CLOBBERs). But yes, I think it might suffer from the same issue. > And I'll certainly need to incrementally mark most if not all current > build_clobbers in omp-low.cc as EOLs and emit birth clobbers (stuff that is > added post gimplification, so too late for gimplification's added birth/eol > handling there and so it must be done manually). Adding testcases for intended stack slot sharing in those cases would be nice. Richard.