[PATCH] D71263: AMDGPU: Don't run redundant GlobalDCE

Stanislav Mekhanoshin via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Dec 10 08:53:20 PST 2019


rampitec added a comment.

In D71263#1777573 <https://reviews.llvm.org/D71263#1777573>, @arsenm wrote:

> In D71263#1777570 <https://reviews.llvm.org/D71263#1777570>, @rampitec wrote:
>
> > The idea to run it was to speedup compilation. After internalize we have an opportunity to remove some functions and do not spend time optimizing them. As far as I understand GlobalDCE is really cheap, unlike passes running before its next invocation.
> >
> > Did you make any compile time measurements to support it?
>
>
> I found this patch lying around from 2017, and don't remember why I was looking at this. There aren't many passes run between the internalize here and GlobalOpt:
>
>   Internalize Global Symbols
>   Dead Global Elimination
>   Interprocedural Sparse Conditional Constant Propagation
>     FunctionPass Manager
>       Dominator Tree Construction
>   Called Value Propagation
>   Deduce and propagate attributes
>   Global Variable Optimizer


AFAIR initially GlobalDCE was added to skip unused library functions after link. Anyway, do you think GlobalDCE adds any visible slowdown, which is more than DT construction?


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D71263/new/

https://reviews.llvm.org/D71263





More information about the llvm-commits mailing list