From ea420114a7d6ea4447638dfb60cf0f2fc7f76e71 Mon Sep 17 00:00:00 2001 From: gtsoul-tech Date: Wed, 1 May 2024 12:59:34 +0300 Subject: [PATCH] knownConditionTrueFalse --- src/hs_valid_platform.c | 1 + src/nfa/limex_compile.cpp | 1 + src/rose/rose_build_merge.cpp | 19 +++++-------------- 3 files changed, 7 insertions(+), 14 deletions(-) diff --git a/src/hs_valid_platform.c b/src/hs_valid_platform.c index 74a8fc1e..3fa1b08d 100644 --- a/src/hs_valid_platform.c +++ b/src/hs_valid_platform.c @@ -48,6 +48,7 @@ hs_error_t HS_CDECL hs_valid_platform(void) { return HS_ARCH_ERROR; } #elif !defined(VS_SIMDE_BACKEND) && (defined(ARCH_ARM32) || defined(ARCH_AARCH64)) + //check_neon returns true for now if (check_neon()) { return HS_SUCCESS; } else { diff --git a/src/nfa/limex_compile.cpp b/src/nfa/limex_compile.cpp index 2ec65552..5bc27301 100644 --- a/src/nfa/limex_compile.cpp +++ b/src/nfa/limex_compile.cpp @@ -1481,6 +1481,7 @@ u32 buildExceptionMap(const build_info &args, ReportListCache &reports_cache, continue; } u32 j = args.state_ids.at(w); + // j can be NO_STATE if args.state_ids.at(w) returns NO_STATE if (j == NO_STATE) { continue; } diff --git a/src/rose/rose_build_merge.cpp b/src/rose/rose_build_merge.cpp index 1e6c9222..c0df5765 100644 --- a/src/rose/rose_build_merge.cpp +++ b/src/rose/rose_build_merge.cpp @@ -1718,9 +1718,8 @@ bool setDistinctTops(NGHolder &h1, const NGHolder &h2, bool setDistinctRoseTops(RoseGraph &g, NGHolder &h1, const NGHolder &h2, const deque &verts1) { map top_mapping; - if (!setDistinctTops(h1, h2, top_mapping)) { - return false; - } + + setDistinctTops(h1, h2, top_mapping); if (top_mapping.empty()) { return true; // No remapping necessary. @@ -1748,9 +1747,7 @@ static bool setDistinctSuffixTops(RoseGraph &g, NGHolder &h1, const NGHolder &h2, const deque &verts1) { map top_mapping; - if (!setDistinctTops(h1, h2, top_mapping)) { - return false; - } + setDistinctTops(h1, h2, top_mapping); if (top_mapping.empty()) { return true; // No remapping necessary. @@ -1837,10 +1834,7 @@ void mergeNfaLeftfixes(RoseBuildImpl &tbi, LeftfixBouquet &roses) { } } - if (!setDistinctRoseTops(g, victim, *r1.graph(), verts2)) { - DEBUG_PRINTF("can't set distinct tops\n"); - continue; // next h2 - } + setDistinctRoseTops(g, victim, *r1.graph(), verts2); assert(victim.kind == r1.graph()->kind); assert(!generates_callbacks(*r1.graph())); @@ -2120,10 +2114,7 @@ void mergeSuffixes(RoseBuildImpl &tbi, SuffixBouquet &suffixes, old_tops[v] = g[v].suffix.top; } - if (!setDistinctSuffixTops(g, victim, *s1.graph(), verts2)) { - DEBUG_PRINTF("can't set distinct tops\n"); - continue; // next h2 - } + setDistinctSuffixTops(g, victim, *s1.graph(), verts2); if (!mergeNfaPair(victim, *s1.graph(), &tbi.rm, tbi.cc)) { DEBUG_PRINTF("merge failed\n");