This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Put scope blocks on a diet
> Alexandre Oliva wrote:
> > On Nov 28, 2007, Mark Mitchell <mark@codesourcery.com> wrote:
> >
> >> True -- but it is consistent across runs and across hosts. Unless the
> >> UIDs vary when you add -g, which, empirically, they do.
> >
> > For the record, before the July 2[46] patch, they didn't.
>
> That's an important fact. Given that, it's certainly not surprising
> that we have algorithms that previously generated the same code with and
> without -g, but now differ.
>
> It sounds like we have three choices:
>
> 1. Revert the July patches and declare that (for now) DECL_UIDs must not
> be influenced by -g. Pros: -g doesn't affect generated code. Cons:
> compiler uses more memory than it does now, though no more than 4.2.
It looks like I've got lost somewhere in this thread. My understanding
is that:
- My July 24/26 changes introducted DECL_UID divergence because of
correlation of SCOPE block prunning and inlininer duplicating them
- Alexandre's and mine patch comitted at Nov 26 reverted this
behaviour so DECL_UIDs are now stable because we prune after
inlining only
- This patch causes memory consumption increase relative to Jul
26-Nov26 compiler at -g, but not at -g0 that started this thread
Since there seems to be consensus that it is sane to keep DECL_UIDs
stable at least for now (and I would tend to think it is quite sane to
keep them stable forever). Why we still need to rever Jul 24/26
patches? This would cause even more memory consumption as the code is
still taking care to prune unneeded scope blocks at both -g and -g0
compilation.
Or is there still some divergence in DECL_UIDs in the mainline I've missed?
Jan