From: Justin Viiret Date: Wed, 22 Mar 2017 23:12:12 +0000 (+1100) Subject: rose_build_groups: allow simple-exh lits to squash X-Git-Tag: v4.5.0^2~145 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a1bc69f3dd4229e78c82882b5ebd9af1b5a88bc5;p=thirdparty%2Fvectorscan.git rose_build_groups: allow simple-exh lits to squash --- diff --git a/src/rose/rose_build_groups.cpp b/src/rose/rose_build_groups.cpp index a253ef04..f17e1ee4 100644 --- a/src/rose/rose_build_groups.cpp +++ b/src/rose/rose_build_groups.cpp @@ -35,6 +35,7 @@ #include "util/boundary_reports.h" #include "util/compile_context.h" +#include "util/report_manager.h" #include #include @@ -597,8 +598,12 @@ bool isGroupSquasher(const RoseBuildImpl &build, const u32 id /* literal id */, /* Case 1 */ - // Can't squash cases with accepts - if (!g[v].reports.empty()) { + // Can't squash cases with accepts unless they are all + // simple-exhaustible. + if (any_of_in(g[v].reports, [&](ReportID report) { + return !isSimpleExhaustible(build.rm.getReport(report)); + })) { + DEBUG_PRINTF("can't squash reporter\n"); return false; }