[PATCH] D85996: [llvm-reduce] make llvm-reduce save the best reduction it has when it crashes
Tyker via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Aug 17 13:18:18 PDT 2020
Tyker added a comment.
In D85996#2219650 <https://reviews.llvm.org/D85996#2219650>, @lebedev.ri wrote:
> This seems fine to me, thanks.
> If you have llvm-reduce crashers, do let me know, i'm interested.
i had one but i has been fixed by 6187eeb683d8c639282d437e6af585e9b7f9c93e <https://reviews.llvm.org/rG6187eeb683d8c639282d437e6af585e9b7f9c93e>.
================
Comment at: llvm/tools/llvm-reduce/llvm-reduce.cpp:84-87
+ if (ReplaceInput) // In-place
+ OutputFilename = InputFilename.c_str();
+ else if (OutputFilename.empty() || OutputFilename == "-")
+ OutputFilename = "reduced.ll";
----------------
lebedev.ri wrote:
> I wonder if we want do to something special if input == output?
>
we could save the original into its original name plus some post-fix like .old before overwriting.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D85996/new/
https://reviews.llvm.org/D85996
More information about the llvm-commits
mailing list