[PATCH] D119878: [FuncSpec] Remove definitions of fully specialized functions.

Chuanqi Xu via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Feb 16 02:59:17 PST 2022


ChuanqiXu accepted this revision.
ChuanqiXu added inline comments.
This revision is now accepted and ready to land.


================
Comment at: llvm/lib/Transforms/IPO/FunctionSpecialization.cpp:515
+        })) {
       Solver.markFunctionUnreachable(AI.Fn);
+      FullySpecialized.push_back(AI.Fn);
----------------
labrinea wrote:
> ChuanqiXu wrote:
> > It surprised me that the unreachable function wouldn't be removed. Have you tested to run opt -O3 for the tests? I think they might be removed in later passes.
> Yes, later passes will remove these dead functions. The benefit of removing them now is that the later passes won't have to discover them all over again.
OK, I agree it is not bad to delete it now since the cost looks cheap.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D119878



More information about the llvm-commits mailing list