[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:28:02 PDT 2021


Meinersbur marked 2 inline comments as done.
Meinersbur added inline comments.


================
Comment at: llvm/test/tools/llvm-reduce/operands-to-args.ll:17-21
+; Do not add any arguments for %Keep and @GlobalKeep.
+; EXCITING: %[[KEEP:LocalKeep[0-9]*]] = add i32 %k, 21
+; EXCITING: store i32 %[[KEEP]], i32* @GlobalKeep, align 4
+
+; EXCITING-LABEL: define void @func_caller() {
----------------
dblaikie wrote:
> I think the dominant terminology here is "interesting" rather than "exciting" - probably best to keep with that for consistency?
I used exciting/boring already for D110534. The reason is that `interesting` is a substring of `uninteresting` and therefore pretty much unusable with FileCheck. It does not apply here, so I changed it to INTERESTING.


================
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);
+  }
+
----------------
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.


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