]> git.ipfire.org Git - thirdparty/vectorscan.git/commitdiff
DEDUPE instr: generate only when necessary
authorJustin Viiret <justin.viiret@intel.com>
Sun, 7 Feb 2016 23:21:17 +0000 (10:21 +1100)
committerMatthew Barr <matthew.barr@intel.com>
Tue, 1 Mar 2016 00:34:11 +0000 (11:34 +1100)
src/rose/rose_build_bytecode.cpp

index c067b6a39e4c6790a8a3918c4f477d01888ebfe3..81b28197daec67376f75797523e217f954407afd 100644 (file)
@@ -3084,7 +3084,11 @@ void makeReport(RoseBuildImpl &build, const ReportID id, const bool has_som,
     switch (report.type) {
     case EXTERNAL_CALLBACK:
         if (!has_som) {
-            makeDedupe(id, report_block);
+            // Dedupe is only necessary if this report has a dkey, or if there
+            // are SOM reports to catch up.
+            if (build.rm.getDkey(report) != ~0U || build.hasSom) {
+                makeDedupe(id, report_block);
+            }
             if (report.ekey == INVALID_EKEY) {
                 report_block.emplace_back(ROSE_INSTR_REPORT);
                 report_block.back().u.report.report = id;