[PATCH] D113537: [llvm-reduce] Count chunks by running a preliminary reduction

Michael Kruse via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Nov 11 12:39:03 PST 2021


Meinersbur added inline comments.


================
Comment at: llvm/tools/llvm-reduce/deltas/Delta.cpp:115
+    ExtractChunksFromModule(Counter, Test.getProgram());
+    Targets = Counter.count();
+  }
----------------
Did you consider adding a test/assertion for the number of calls to `shouldKeep()` by the reduce function remains the same every time? Having an explicit count function requires one to think how many there are, but I fear it will also be easier to write reduce functions whose number of targets depends on the result of the `shouldKeep()` function.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D113537/new/

https://reviews.llvm.org/D113537



More information about the llvm-commits mailing list