[PATCH] D111661: [FuncSpec] Only visit uses of the instruction instead of every constant use.
duk via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Oct 13 18:40:46 PDT 2021
duck-37 added inline comments.
================
Comment at: llvm/lib/Transforms/IPO/FunctionSpecialization.cpp:305-306
- for (auto *U : Const->users())
- if (auto *I = dyn_cast<Instruction>(U))
+ // Using replaceUsesWithIf is probably the easiest way to do this without
+ // duplicating code.
+ SmallVector<Instruction *, 8> ReplacedUsers;
----------------
ChuanqiXu wrote:
> This comment may be confusing. We could understand this comment due to we are visiting this diff page. But other readers may be confused about this since they lost the context.
That's true, but I'm thinking about holding off on this patch because I think this entire code block might not be needed.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D111661/new/
https://reviews.llvm.org/D111661
More information about the llvm-commits
mailing list