[PATCH] D113537: [llvm-reduce] Count chunks by running a preliminary reduction
Arthur Eubanks via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Nov 11 15:35:51 PST 2021
aeubanks added inline comments.
================
Comment at: llvm/tools/llvm-reduce/deltas/Delta.cpp:115
+ ExtractChunksFromModule(Counter, Test.getProgram());
+ Targets = Counter.count();
+ }
----------------
Meinersbur wrote:
> 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.
I don't think having an explicit count function helps. It's still very easy to have the reduce pass allow one reduction to also affect another reduction regardless of counting. So I don't think this patch makes things worse.
I can add such a test/assert in a followup patch, I'm afraid some existing pass already doesn't pass this test.
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