[LTO] Make Move lto-symtab.c out of lto/
Doug Kwan (關振德)
dougkwan@google.com
Fri Oct 24 07:58:00 GMT 2008
Rafael,
I have a sandbox for making ipa-cp.c WHOPR friend but I ran into
problem as some of the lto_symtab functions are used indirectly and I
got linker errors in the C/C++ FEs because the lto_symbtab functions
are into the lto1 FE only. Although we do not read IR files in
non-lto FEs, the IR reading functions are present in all FEs due to
pointers to them from the ipa_opt_pass structs. The summary readers
now need to know about symbol resolution to discard or ignore summary
information. For example, you had to extract a part of the
lto-cgraph.c into lto1 because it needs to use
lto_symtab_prevailing_decl. You also defined a lang-hook just for
input_cgraph. I don't think we should define other lang-hooks for
other IPA summary readers. Instead the lto_symtab functions should be
visibile to all FEs. This can simply be done by pulling the file
lto-symtab.c out of lto1. When that it done. I think we can
eliminate the input_cgraph hook and move back the code to
lto-cgraph.c, where it logically belongs.
Thoughts? Comments?
-Doug
More information about the Gcc-patches
mailing list