[PATCH] D122755: [FuncSpec] Constant propagate multiple arguments for recursive functions.

Alexandros Lamprineas via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Mar 30 11:43:17 PDT 2022


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

This fixes a TODO in `constantArgPropagation()` to make it feature complete. However, I do find myself in agreement with the review comments in https://reviews.llvm.org/D106426. I don't think we should pursue specializing such recursive functions as the code size increase becomes linear to `max-iters`. Compiling the modified test just with `-O3` (no function specialization) generates the same code.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D122755

Files:
  llvm/lib/Transforms/IPO/FunctionSpecialization.cpp
  llvm/test/Transforms/FunctionSpecialization/function-specialization-recursive.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D122755.419227.patch
Type: text/x-patch
Size: 6404 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220330/1f3b5b95/attachment.bin>


More information about the llvm-commits mailing list