mirror of
https://github.com/VectorCamp/vectorscan.git
synced 2025-06-28 16:41:01 +03:00
rose: don't build empty sparse iter subprograms
This commit is contained in:
parent
679042779a
commit
6239805561
@ -3409,6 +3409,7 @@ void addPredBlocksSingle(
|
|||||||
|
|
||||||
for (const auto &m : predProgramLists) {
|
for (const auto &m : predProgramLists) {
|
||||||
const u32 &pred_state = m.first;
|
const u32 &pred_state = m.first;
|
||||||
|
assert(!m.second.empty());
|
||||||
auto subprog = flattenProgram(m.second);
|
auto subprog = flattenProgram(m.second);
|
||||||
|
|
||||||
// Check our pred state.
|
// Check our pred state.
|
||||||
@ -3465,6 +3466,7 @@ void addPredBlocksMulti(build_context &bc,
|
|||||||
DEBUG_PRINTF("subprogram %zu has offset %u\n", jump_table.size(),
|
DEBUG_PRINTF("subprogram %zu has offset %u\n", jump_table.size(),
|
||||||
curr_offset);
|
curr_offset);
|
||||||
jump_table.push_back(curr_offset);
|
jump_table.push_back(curr_offset);
|
||||||
|
assert(!e.second.empty());
|
||||||
auto subprog = flattenProgram(e.second);
|
auto subprog = flattenProgram(e.second);
|
||||||
|
|
||||||
if (e.first != keys.back()) {
|
if (e.first != keys.back()) {
|
||||||
@ -3800,6 +3802,9 @@ vector<RoseInstruction> buildLiteralProgram(RoseBuildImpl &build,
|
|||||||
assert(contains(bc.roleStateIndices, u));
|
assert(contains(bc.roleStateIndices, u));
|
||||||
u32 pred_state = bc.roleStateIndices.at(u);
|
u32 pred_state = bc.roleStateIndices.at(u);
|
||||||
auto program = makeProgram(build, bc, e);
|
auto program = makeProgram(build, bc, e);
|
||||||
|
if (program.empty()) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
predProgramLists[pred_state].push_back(program);
|
predProgramLists[pred_state].push_back(program);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -4047,6 +4052,9 @@ void addEodAnchorProgram(RoseBuildImpl &build, build_context &bc,
|
|||||||
u32 predStateIdx = bc.roleStateIndices.at(u);
|
u32 predStateIdx = bc.roleStateIndices.at(u);
|
||||||
|
|
||||||
auto program = makeEodAnchorProgram(build, bc, e, multiple_preds);
|
auto program = makeEodAnchorProgram(build, bc, e, multiple_preds);
|
||||||
|
if (program.empty()) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
predProgramLists[predStateIdx].push_back(program);
|
predProgramLists[predStateIdx].push_back(program);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user