From: Justin Viiret Date: Sun, 7 Feb 2016 23:21:17 +0000 (+1100) Subject: DEDUPE instr: generate only when necessary X-Git-Tag: v4.2.0^2~154 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=cd133f77eedeca8c507ead6e49d53fed7791354b;p=thirdparty%2Fvectorscan.git DEDUPE instr: generate only when necessary --- diff --git a/src/rose/rose_build_bytecode.cpp b/src/rose/rose_build_bytecode.cpp index c067b6a3..81b28197 100644 --- a/src/rose/rose_build_bytecode.cpp +++ b/src/rose/rose_build_bytecode.cpp @@ -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;