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

Roman Lebedev via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Oct 28 08:59:54 PDT 2021


lebedev.ri added a comment.

In D110527#3093864 <https://reviews.llvm.org/D110527#3093864>, @aeubanks wrote:

> In D110527#3080186 <https://reviews.llvm.org/D110527#3080186>, @markus wrote:
>
>> 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.
>
> I think currently the shared mir vs ir code doesn't hinder development too much. If it ever does come to that point we should split off an llvm-mir-reduce, but that can be done in the future.

Do these tools have anything in common other than the delta algorithm?
Will *any* pass be shared?

> (and sorry, I've been busy, trying to find time to review)




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

https://reviews.llvm.org/D110527



More information about the llvm-commits mailing list