[PATCH] D119815: [FuncSpec]Save compilation time by caching uses of replaced value
Chuanqi Xu via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Feb 15 01:32:28 PST 2022
ChuanqiXu accepted this revision.
ChuanqiXu added a comment.
This revision is now accepted and ready to land.
LGTM. It would better add `[NFC]` tag in the title.
================
Comment at: llvm/lib/Transforms/IPO/FunctionSpecialization.cpp:347
- V->replaceAllUsesWith(Const);
-
- for (auto *U : Const->users())
+ // Cache uses so that we can do propagation after replacing it with const.
+ SmallVector<Instruction *, 8> UseInsts;
----------------
// Cache uses of V so that we could avoid visiting unwanted users of Const.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D119815/new/
https://reviews.llvm.org/D119815
More information about the llvm-commits
mailing list