Hi Yaron, This is to handle the case of pre-built (real .o) files. The available externally functions are kept in the -c -flto compile (the pass isn't run) so that they are available for inlining in the LTO pipeline. If the available externally function is in a pre-built object file it wouldn't be subject to inlining or other IPO. A subsequent round of EliminateAvailableExternallyPass during the LTO pipeline cleans up the copies kept initially. I'm wondering if the call I placed in the LTO pipeline (in addLateLTOOptimizationPasses) should similarly be moved earlier, sometime shortly after inlining in addLTOOptimizationPasses().
Teresa On Wed, Sep 2, 2015 at 12:02 AM, Yaron Keren <yaron.ke...@gmail.com> wrote: > r246619, thanks! > About createEliminateAvailableExternallyPass for LTO, I'm missing something. > At link time, aren't available externally function supposed to be, well, > available as external linkage? Won't the link fail without these versions? > if so, why keep the available externally versions at all for LTO instead of > using the external linkage versions? > > > 2015-09-01 23:56 GMT+03:00 Teresa Johnson <tejohn...@google.com>: >> >> Hi Yaron, >> >> Thanks, moving it earlier in general seems ok to me. I originally put >> this right before the GlobalDCE calls because it was somewhat related. >> I wonder if the createEliminateAvailableExternallyPass call for the >> LTO pipeline should similarly be moved up closer to inlining, perhaps >> after any IP alias analysis passes? Hopefully someone more familiar >> with the passes than I will comment on how early we can do this. >> >> Teresa >> >> On Tue, Sep 1, 2015 at 1:32 PM, Yaron Keren via cfe-commits >> <cfe-commits@lists.llvm.org> wrote: >> > Following the discussion on cfe-dev, this moves >> > createEliminateAvailableExternallyPass earlier in the pass pipeline to >> > save >> > running many ModulePasses on available external functions that are >> > thrown >> > away anyhow. >> > >> > >> > _______________________________________________ >> > cfe-commits mailing list >> > cfe-commits@lists.llvm.org >> > http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits >> > >> >> >> >> -- >> Teresa Johnson | Software Engineer | tejohn...@google.com | 408-460-2413 > > -- Teresa Johnson | Software Engineer | tejohn...@google.com | 408-460-2413 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits