[PATCH] D110527: [llvm-reduce] Add MIR support.

Markus Lavin via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Oct 22 02:07:00 PDT 2021


markus added a comment.

In D110527#3079133 <https://reviews.llvm.org/D110527#3079133>, @lebedev.ri wrote:

> I'm not sure i fully like the coupling here.
> In reality, how much code duplication is being avoided by bundling these two tools together?

Well, it is true that the llvm-reduce tool did not contain that many lines of code in the first place, and especially not if one excludes the IR specific reduction passes.
There is the Delta Debugging Algorithm in Delta.cpp and some general stuff for handling input and output files as well as running the interestingness tests.
In general code duplication is considered a bad thing so I think we all can agree that code reuse in some sense is desirable.

> Would it not be better to extract the common interface and simplify writing new back/front -ends for llvm-reduce,
> instead of having everything in a single tool?

Could be but it also seems like that would be a much larger change (at least to the existing llvm-reduce). I am not particularly interested in doing that in this patch but as always anyone is free to evolve things further in a follow up commit if they consider it worth while.


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

https://reviews.llvm.org/D110527



More information about the llvm-commits mailing list