[PATCH] D146158: [FuncSpec] Track the return values of specializations.
Momchil Velikov via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Apr 3 02:27:19 PDT 2023
chill added inline comments.
================
Comment at: llvm/lib/Transforms/Utils/SCCPSolver.cpp:530
+ if (auto *UI = dyn_cast<Instruction>(U))
+ invalidate(UI);
+
----------------
It'd be better to not write function recursively, but with an explicit worklist. Both maximum length of the list and the maximum stack depth would be the same (say `N`), but while the worklist would keep `N` pointers, the stack would grow to `N` stack frames, which is easily several times bigger memory usage (resp. cache footprint) and has the potential to overflow in extreme cases.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D146158/new/
https://reviews.llvm.org/D146158
More information about the llvm-commits
mailing list