[PATCH] D145819: [FuncSpec] Increase the maximum number of times the specializer can run.

Alexandros Lamprineas via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Mar 10 11:38:30 PST 2023


labrinea created this revision.
labrinea added reviewers: ChuanqiXu, SjoerdMeijer, chill.
Herald added subscribers: snehasish, ormris, hiraditya.
Herald added a project: All.
labrinea requested review of this revision.
Herald added a project: LLVM.

Changes the default value of `FuncSpecMaxIters` from 1 to 10. This allows specialization of recursive functions. To reduce the overhead of finding potential specializations we do slightly different things on following invocations of run() compared to the first one. In the first invocation we examine the entire module. We calculate the CodeMetrics for candidate functions and then examine all the interesting call sites. In later invocations we are only interested in call sites which reside in cloned functions created on the previous iteration.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D145819

Files:
  llvm/include/llvm/Transforms/IPO/FunctionSpecialization.h
  llvm/lib/Transforms/IPO/FunctionSpecialization.cpp
  llvm/lib/Transforms/IPO/SCCP.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D145819.504224.patch
Type: text/x-patch
Size: 17480 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230310/9126d4ac/attachment.bin>


More information about the llvm-commits mailing list