On Fri, Aug 30, 2013 at 8:54 AM, Jan Hubicka <hubi...@ucw.cz> wrote: > Hi, > this patch fixes gcc.dg/tree-ssa/attr-alias.c on x86-64 target. > The problem here is that we attempt to create local alias since we consider > weakref > of test() to be overwritable and at the same time available. > The change in cgraph_function_body_availability makes weakref to properly > inherit > availability of their target (that is weak in the testcase). > Fixing it uncovered more issues - with -flto-partition=none and -O0 we run > into problem > that cgraph edge redirections are not applied. This is becuase inliner is not > run in > this scenario when it ought to be (precisely because edge redirection is > happened). > So the patch removes ipa_inline's gate logic, makes it to not do something > useless at > -O0 and also removes fixup_cfg pass that is really part of inliner's > transform. > > While updating varpool part of availability I noticed that it is wrong for > vtables > and constant pool. Fixed thus. > > Finally I noticed that symbol renaming is broken on non-weakref targets. > > Bootstrapped/regtested x86_64-linux, comitted. > > Honza > * cgraph.c (cgraph_function_body_availability): Handle weakref > correctly. > * gcc.dg/tree-ssa/attr-alias.c: Rename test3 to test1 to match > template > and comment. > * passes.def: Remove pass_fixup_cfg. > * ipa-inline.c (ipa_inline): When not optimizing, do not inline; > track when we need to remove functions. > (gate_ipa_inline): Execute inlining always; add comment why. > (pass_data_ipa_inline): Remove TODO_remove_functions. > * ipa-inline-analysis.c (inline_generate_summary): When not optimizing > do not produce summaries. > * symtab.c (change_decl_assembler_name): Handle renaming of weakrefs. > (symtab_nonoverwritable_alias): Assert we are not called on weakref. > * varpool.c (cgraph_variable_initializer_availability): Fix weakrefs, > constant pool and vtable.
This caused: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64076 -- H.J.