[FuncSpec] Save compilation time by caching uses for propagation
authorBin Cheng <bin.cheng@linux.alibaba.com>
Tue, 15 Feb 2022 08:51:04 +0000 (16:51 +0800)
committerBin Cheng <bin.cheng@linux.alibaba.com>
Wed, 16 Feb 2022 02:46:26 +0000 (10:46 +0800)
commitdfec0b3053b9d433fa3770ff31bc540406db4ba8
tree406d8b3ba451fca6fbf9928c321d33cc7f1ea0c5
parentb7847199044e46e0a138586e6f525ef071b3e1f8
[FuncSpec] Save compilation time by caching uses for propagation

We only need to do propagation on use instructions of the original
value, rather than the replacing const value which might have lots
of irrelavant uses.  This is done by caching uses before replacing.

Differential Revision: https://reviews.llvm.org/D119815
llvm/lib/Transforms/IPO/FunctionSpecialization.cpp