]> git.ipfire.org Git - thirdparty/vectorscan.git/commitdiff
rose_build_groups: allow simple-exh lits to squash
authorJustin Viiret <justin.viiret@intel.com>
Wed, 22 Mar 2017 23:12:12 +0000 (10:12 +1100)
committerMatthew Barr <matthew.barr@intel.com>
Wed, 26 Apr 2017 05:18:13 +0000 (15:18 +1000)
src/rose/rose_build_groups.cpp

index a253ef048b1fbe98165423d2455e96d296641907..f17e1ee4a97fc5794df529f1b0dc7b798b39a5e8 100644 (file)
@@ -35,6 +35,7 @@
 
 #include "util/boundary_reports.h"
 #include "util/compile_context.h"
+#include "util/report_manager.h"
 
 #include <queue>
 #include <vector>
@@ -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;
         }