[PATCH] D104373: [FuncSpec] Option for specializing const globals and function pointers.

Chuanqi Xu via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jun 16 19:03:38 PDT 2021


ChuanqiXu added inline comments.


================
Comment at: llvm/lib/Transforms/IPO/FunctionSpecialization.cpp:488
       // site. Additionally, set the AllConstant flag to false.
       if (V != A && !Solver.getLatticeValueFor(V).isConstant()) {
         AllConstant = false;
----------------
When would `V != A` become false? It looks always true to me.

BTW, since `!Solver.getLatticeValueFor(V).isConstant()` would be true for normal constant, it wouldn't run into the following condition in my minds.


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

https://reviews.llvm.org/D104373



More information about the llvm-commits mailing list