]> git.ipfire.org Git - thirdparty/vectorscan.git/commitdiff
Remove OutfixInfo::chained (which meant "is MPV")
authorJustin Viiret <justin.viiret@intel.com>
Mon, 18 Apr 2016 03:12:15 +0000 (13:12 +1000)
committerMatthew Barr <matthew.barr@intel.com>
Wed, 20 Apr 2016 03:34:57 +0000 (13:34 +1000)
src/rose/rose_build_add.cpp
src/rose/rose_build_bytecode.cpp
src/rose/rose_build_impl.h
src/rose/rose_build_merge.cpp

index f2ef2ca9cc05eacde44ed892ed86f1c706ff8c53..a0ccb7ae1835e842acd8506b1473fffe92cad998 100644 (file)
@@ -1777,7 +1777,6 @@ bool RoseBuildImpl::addOutfix(const NGHolder &h, const raw_som_dfa &haig) {
 bool RoseBuildImpl::addOutfix(const raw_puff &rp) {
     if (!mpv_outfix) {
         mpv_outfix = make_unique<OutfixInfo>(MpvProto());
-        mpv_outfix->chained = true;
     }
 
     auto *mpv = mpv_outfix->mpv();
@@ -1803,7 +1802,6 @@ bool RoseBuildImpl::addChainTail(const raw_puff &rp, u32 *queue_out,
                                  u32 *event_out) {
     if (!mpv_outfix) {
         mpv_outfix = make_unique<OutfixInfo>(MpvProto());
-        mpv_outfix->chained = true;
     }
 
     auto *mpv = mpv_outfix->mpv();
index fe0903807c7fe2e4d9b265e3704ecf489c24598e..f79bce5bc9c1f2430d82abb0848a82bd893f743f 100644 (file)
@@ -1340,7 +1340,7 @@ void prepMpv(RoseBuildImpl &tbi, build_context &bc, size_t *historyRequired,
             assert(!mpv_outfix);
             mpv_outfix = &out;
         } else {
-            assert(!out.chained);
+            assert(!out.mpv());
         }
     }
 
@@ -1348,7 +1348,6 @@ void prepMpv(RoseBuildImpl &tbi, build_context &bc, size_t *historyRequired,
         return;
     }
 
-    assert(mpv_outfix->chained);
     auto *mpv = mpv_outfix->mpv();
     auto nfa = mpvCompile(mpv->puffettes, mpv->triggered_puffettes);
     assert(nfa);
@@ -1408,7 +1407,7 @@ bool prepOutfixes(RoseBuildImpl &tbi, build_context &bc,
     assert(tbi.qif.allocated_count() == bc.engineOffsets.size());
 
     for (auto &out : tbi.outfixes) {
-        if (out.chained) {
+        if (out.mpv()) {
             continue; /* already done */
         }
         DEBUG_PRINTF("building outfix %zd\n", &out - &tbi.outfixes[0]);
index 4b9f6f103d62bf47629bfbeac46f40fe0a841a97..4122e0bdadbc89a4c5eb7754d3dcabe42195526a 100644 (file)
@@ -385,7 +385,6 @@ struct OutfixInfo {
     depth minWidth = depth::infinity();
     depth maxWidth = 0;
     u64a maxOffset = 0;
-    bool chained = false;
     bool in_sbmatcher = false; //!< handled by small-block matcher.
 
 private:
index 664aaef78ab86a38dc50c70350d0a855299fb5f8..7a329e9a3e0a0ac9db3532cc1b244f8f4a61ba6b 100644 (file)
@@ -2417,9 +2417,6 @@ void mergeOutfixInfo(OutfixInfo &winner, const OutfixInfo &victim) {
     // layer at runtime will protect us from extra matches if only one was in
     // the small block matcher.
     winner.in_sbmatcher &= victim.in_sbmatcher;
-
-    // We should never have merged outfixes that differ in these properties.
-    assert(winner.chained == victim.chained);
 }
 
 static
@@ -2651,7 +2648,6 @@ void mergeOutfixCombo(RoseBuildImpl &tbi, const ReportManager &rm,
     for (auto it = tbi.outfixes.begin(); it != tbi.outfixes.end(); ++it) {
         auto &outfix = *it;
         assert(!outfix.is_dead());
-        assert(!outfix.chained);
 
         if (outfix.rdfa()) {
             auto *rdfa = outfix.rdfa();
@@ -2727,7 +2723,6 @@ void mergeOutfixes(RoseBuildImpl &tbi) {
     vector<raw_som_dfa *> som_dfas;
 
     for (auto &outfix : tbi.outfixes) {
-        assert(!outfix.chained);
         if (outfix.rdfa()) {
             dfas.push_back(outfix.rdfa());
         } else if (outfix.holder()) {