[LLVMdev] Removing AvailableExternal values in GlobalDCE (was Re: RFC: ThinLTO Impementation Plan)

Reid Kleckner rnk at google.com
Thu Jun 4 16:51:55 PDT 2015


On Thu, Jun 4, 2015 at 3:58 PM, Duncan P. N. Exon Smith <
dexonsmith at apple.com> wrote:
>
> > Personally, I think the right approach is to add a bool to
> createGlobalDCEPass defaulting to true named something like
> IsAfterInlining. In most standard pass pipelines, GlobalDCE runs after
> inlining for obvious reasons, so the default makes sense. The special case
> is the LTO pass pipeline, where the code will be reloaded and reoptimized
> later. IMO it's natural to put the customization there.
>
> That's a good point.  But I still like these as separate passes.


Hm, yeah, that's pretty sane. So, add a pass to downgrade
available_externally global definitions to declarations with external
linkage, add it to the standard -O2 pass pipeline, ensure that it's not
part of LTO, and then call it done?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20150604/282219a4/attachment.html>


More information about the llvm-dev mailing list