[PATCH] D111503: [llvm-reduce] Introduce operands-to-args pass.
Michael Kruse via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sun Oct 10 14:42:00 PDT 2021
Meinersbur added inline comments.
================
Comment at: llvm/tools/llvm-reduce/deltas/ReduceOperandsToArgs.cpp:170-178
+ SmallVector<Function *> Funcs;
+ for (auto &F : Program->functions()) {
+ if (!canReplaceFunction(&F))
+ continue;
+ Funcs.push_back(&F);
+ }
+
----------------
Meinersbur wrote:
> dblaikie wrote:
> > Any particular reason these loops can't be combined (removing the "Funcs" SmallVector in the process) like the `countOperands` function below?
> The Module's function list is modified in `substituteOperandWithArgument` and invalidates iterators.
Using make_early_inc_range now to avoid the invalidated iterator.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D111503/new/
https://reviews.llvm.org/D111503
More information about the llvm-commits
mailing list