On Mon, Jan 4, 2016 at 7:53 PM, Jeff Law <l...@redhat.com> wrote: > On 01/04/2016 08:57 AM, Nathan Sidwell wrote: >> >> My patch to stop constant pool objects accidentally ending up in the >> varpool caused problems with (at least) powerpc. >> (https://gcc.gnu.org/ml/gcc-patches/2015-12/msg02100.html) Hence reverted. >> >> This patch changes compare_base_decls to simply use the varpool getter, >> rather than get_create. We still need the preceding decl_in_symtab_p to >> filter out decls that should never be in the varpool (the getter has an >> assert to check you're not trying to abuse it). >> >> ok? > > Once it passes the usual bootstrap & regression testing. > > Looking at it again, it seems "obvious" now that the act of comparing things > for alias analysis shouldn't be inserting new things into the tables.
I asked hoza to do this change as well but he replied with a rather lengthy answer that using get_create is correct. Oh, and I _do_ belive that ultimatively we should have all constant pool entries (and CONST_DECLs) in the varpool. So, Honza, can you please chime in here and comment on the (already committed) patches? Richard. > > jeff