[PATCH] D111661: [FuncSpec] Only visit uses of the instruction instead of every constant use.

Chuanqi Xu via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Oct 13 04:53:35 PDT 2021


ChuanqiXu added inline comments.


================
Comment at: llvm/lib/Transforms/IPO/FunctionSpecialization.cpp:304
         isConstant(IV) ? Solver.getConstant(IV) : UndefValue::get(V->getType());
     V->replaceAllUsesWith(Const);
 
----------------
duck-37 wrote:
> ChuanqiXu wrote:
> > It looks like this line should be included.
> This is supplemented by the `replaceUsesOfWith` in the patch. However, when looking over this, I realized that the way I submitted this is just plain wrong.
Thanks for updating this. Now it looks more reasonable. But I am still confused. After line 304, V shouldn't have any uses, right? So how could we replace uses for V on line 308?


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