Fix 'unqualified call to std::move' errors in clang 15+

This commit is contained in:
Konstantinos Margaritis
2023-10-03 20:24:39 +03:00
parent 4918f81ea3
commit 0d2f9ccbaa
37 changed files with 224 additions and 224 deletions

View File

@@ -1780,7 +1780,7 @@ bool RoseBuildImpl::addOutfix(const NGHolder &h) {
}
if (rdfa) {
outfixes.emplace_back(OutfixInfo(move(rdfa)));
outfixes.emplace_back(OutfixInfo(std::move(rdfa)));
} else {
outfixes.emplace_back(OutfixInfo(cloneHolder(h)));
}

View File

@@ -144,9 +144,9 @@ void mergeAnchoredDfas(vector<unique_ptr<raw_dfa>> &dfas,
for (auto &rdfa : dfas) {
u32 start_size = mcclellanStartReachSize(rdfa.get());
if (start_size <= MAX_SMALL_START_REACH) {
small_starts.emplace_back(move(rdfa));
small_starts.emplace_back(std::move(rdfa));
} else {
big_starts.emplace_back(move(rdfa));
big_starts.emplace_back(std::move(rdfa));
}
}
dfas.clear();
@@ -158,10 +158,10 @@ void mergeAnchoredDfas(vector<unique_ptr<raw_dfa>> &dfas,
// Rehome our groups into one vector.
for (auto &rdfa : small_starts) {
dfas.emplace_back(move(rdfa));
dfas.emplace_back(std::move(rdfa));
}
for (auto &rdfa : big_starts) {
dfas.emplace_back(move(rdfa));
dfas.emplace_back(std::move(rdfa));
}
// Final test: if we've built two DFAs here that are small enough, we can
@@ -685,7 +685,7 @@ int finalise_out(RoseBuildImpl &build, const NGHolder &h,
if (check_dupe(*out_dfa, build.anchored_nfas[hash], remap)) {
return ANCHORED_REMAP;
}
build.anchored_nfas[hash].emplace_back(move(out_dfa));
build.anchored_nfas[hash].emplace_back(std::move(out_dfa));
return ANCHORED_SUCCESS;
}
@@ -700,7 +700,7 @@ int addAutomaton(RoseBuildImpl &build, const NGHolder &h, ReportID *remap) {
auto out_dfa = std::make_unique<raw_dfa>(NFA_OUTFIX_RAW);
if (determinise(autom, out_dfa->states, MAX_DFA_STATES)) {
return finalise_out(build, h, autom, move(out_dfa), remap);
return finalise_out(build, h, autom, std::move(out_dfa), remap);
}
DEBUG_PRINTF("determinise failed\n");
@@ -767,7 +767,7 @@ void buildSimpleDfas(const RoseBuildImpl &build, const vector<u32> &frag_map,
rdfa->start_floating = DEAD_STATE;
rdfa->alpha_size = autom.alphasize;
rdfa->alpha_remap = autom.alpha;
anchored_dfas->emplace_back(move(rdfa));
anchored_dfas->emplace_back(std::move(rdfa));
}
}
@@ -784,7 +784,7 @@ vector<unique_ptr<raw_dfa>> getAnchoredDfas(RoseBuildImpl &build,
// DFAs that already exist as raw_dfas.
for (auto &anch_dfas : build.anchored_nfas) {
for (auto &rdfa : anch_dfas.second) {
dfas.emplace_back(move(rdfa));
dfas.emplace_back(std::move(rdfa));
}
}
build.anchored_nfas.clear();
@@ -834,7 +834,7 @@ size_t buildNfas(vector<raw_dfa> &anchored_dfas,
assert(nfa->length);
total_size += ROUNDUP_CL(sizeof(anchored_matcher_info) + nfa->length);
nfas->emplace_back(move(nfa));
nfas->emplace_back(std::move(nfa));
}
// We no longer need to keep the raw_dfa structures around.
@@ -861,7 +861,7 @@ vector<raw_dfa> buildAnchoredDfas(RoseBuildImpl &build,
dfas.reserve(anch_dfas.size());
for (auto &rdfa : anch_dfas) {
assert(rdfa);
dfas.emplace_back(move(*rdfa));
dfas.emplace_back(std::move(*rdfa));
}
return dfas;
}

View File

@@ -701,9 +701,9 @@ buildSuffix(const ReportManager &rm, const SomSlotManager &ssm,
auto d = getDfa(*rdfa, false, cc, rm);
assert(d);
if (cc.grey.roseMcClellanSuffix != 2) {
n = pickImpl(move(d), move(n), fast_nfa);
n = pickImpl(std::move(d), std::move(n), fast_nfa);
} else {
n = move(d);
n = std::move(d);
}
assert(n);
@@ -853,7 +853,7 @@ bytecode_ptr<NFA> makeLeftNfa(const RoseBuildImpl &tbi, left_id &left,
if (rdfa) {
auto d = getDfa(*rdfa, is_transient, cc, rm);
assert(d);
n = pickImpl(move(d), move(n), fast_nfa);
n = pickImpl(std::move(d), std::move(n), fast_nfa);
}
}
@@ -1422,12 +1422,12 @@ void buildExclusiveInfixes(RoseBuildImpl &build, build_context &bc,
setLeftNfaProperties(*n, leftfix);
ExclusiveSubengine engine;
engine.nfa = move(n);
engine.nfa = std::move(n);
engine.vertices = verts;
info.subengines.emplace_back(move(engine));
info.subengines.emplace_back(std::move(engine));
}
info.queue = qif.get_queue();
exclusive_info.emplace_back(move(info));
exclusive_info.emplace_back(std::move(info));
}
updateExclusiveInfixProperties(build, exclusive_info, bc.leftfix_info,
no_retrigger_queues);
@@ -1649,7 +1649,7 @@ public:
if (rdfa) {
auto d = getDfa(*rdfa, false, cc, rm);
if (d) {
n = pickImpl(move(d), move(n), fast_nfa);
n = pickImpl(std::move(d), std::move(n), fast_nfa);
}
}
}
@@ -1864,15 +1864,15 @@ void buildExclusiveSuffixes(RoseBuildImpl &build, build_context &bc,
setSuffixProperties(*n, s, build.rm);
ExclusiveSubengine engine;
engine.nfa = move(n);
engine.nfa = std::move(n);
engine.vertices = verts;
info.subengines.emplace_back(move(engine));
info.subengines.emplace_back(std::move(engine));
const auto &reports = all_reports(s);
info.reports.insert(reports.begin(), reports.end());
}
info.queue = qif.get_queue();
exclusive_info.emplace_back(move(info));
exclusive_info.emplace_back(std::move(info));
}
updateExclusiveSuffixProperties(build, exclusive_info,
no_retrigger_queues);
@@ -2416,7 +2416,7 @@ u32 writeProgram(build_context &bc, RoseProgram &&program) {
u32 offset = bc.engine_blob.add(prog_bytecode);
DEBUG_PRINTF("prog len %zu written at offset %u\n", prog_bytecode.size(),
offset);
bc.program_cache.emplace(move(program), offset);
bc.program_cache.emplace(std::move(program), offset);
return offset;
}
@@ -2581,13 +2581,13 @@ void makeBoundaryPrograms(const RoseBuildImpl &build, build_context &bc,
DEBUG_PRINTF("report ^$: %zu\n", dboundary.report_at_0_eod_full.size());
auto eod_prog = makeBoundaryProgram(build, boundary.report_at_eod);
out.reportEodOffset = writeProgram(bc, move(eod_prog));
out.reportEodOffset = writeProgram(bc, std::move(eod_prog));
auto zero_prog = makeBoundaryProgram(build, boundary.report_at_0);
out.reportZeroOffset = writeProgram(bc, move(zero_prog));
out.reportZeroOffset = writeProgram(bc, std::move(zero_prog));
auto zeod_prog = makeBoundaryProgram(build, dboundary.report_at_0_eod_full);
out.reportZeroEodOffset = writeProgram(bc, move(zeod_prog));
out.reportZeroEodOffset = writeProgram(bc, std::move(zeod_prog));
}
static
@@ -2752,10 +2752,10 @@ RoseProgram makeFragmentProgram(const RoseBuildImpl &build, build_context &bc,
for (const auto &lit_id : lit_ids) {
auto prog = makeLiteralProgram(build, bc, prog_build, lit_id,
lit_edge_map, false);
blocks.emplace_back(move(prog));
blocks.emplace_back(std::move(prog));
}
return assembleProgramBlocks(move(blocks));
return assembleProgramBlocks(std::move(blocks));
}
/**
@@ -2865,7 +2865,7 @@ vector<LitFragment> groupByFragment(const RoseBuildImpl &build) {
auto &fi = m.second;
DEBUG_PRINTF("frag %s -> ids: %s\n", dumpString(m.first.s).c_str(),
as_string_list(fi.lit_ids).c_str());
fragments.emplace_back(frag_id, lit.s, fi.groups, move(fi.lit_ids));
fragments.emplace_back(frag_id, lit.s, fi.groups, std::move(fi.lit_ids));
frag_id++;
assert(frag_id == fragments.size());
}
@@ -2981,7 +2981,7 @@ void buildFragmentPrograms(const RoseBuildImpl &build,
child_offset);
addIncludedJumpProgram(lit_prog, child_offset, pfrag.squash);
}
pfrag.lit_program_offset = writeProgram(bc, move(lit_prog));
pfrag.lit_program_offset = writeProgram(bc, std::move(lit_prog));
// We only do delayed rebuild in streaming mode.
if (!build.cc.streaming) {
@@ -3001,7 +3001,7 @@ void buildFragmentPrograms(const RoseBuildImpl &build,
addIncludedJumpProgram(rebuild_prog, child_offset,
pfrag.delay_squash);
}
pfrag.delay_program_offset = writeProgram(bc, move(rebuild_prog));
pfrag.delay_program_offset = writeProgram(bc, std::move(rebuild_prog));
}
}
@@ -3090,7 +3090,7 @@ pair<u32, u32> writeDelayPrograms(const RoseBuildImpl &build,
auto prog = makeLiteralProgram(build, bc, prog_build,
delayed_lit_id, lit_edge_map,
false);
u32 offset = writeProgram(bc, move(prog));
u32 offset = writeProgram(bc, std::move(prog));
u32 delay_id;
auto it = cache.find(offset);
@@ -3150,7 +3150,7 @@ pair<u32, u32> writeAnchoredPrograms(const RoseBuildImpl &build,
auto prog = makeLiteralProgram(build, bc, prog_build, lit_id,
lit_edge_map, true);
u32 offset = writeProgram(bc, move(prog));
u32 offset = writeProgram(bc, std::move(prog));
DEBUG_PRINTF("lit_id=%u -> anch prog at %u\n", lit_id, offset);
u32 anch_id;
@@ -3210,7 +3210,7 @@ pair<u32, u32> buildReportPrograms(const RoseBuildImpl &build,
for (ReportID id : reports) {
auto program = makeReportProgram(build, bc.needs_mpv_catchup, id);
u32 offset = writeProgram(bc, move(program));
u32 offset = writeProgram(bc, std::move(program));
programs.emplace_back(offset);
build.rm.setProgramOffset(id, offset);
DEBUG_PRINTF("program for report %u @ %u (%zu instructions)\n", id,
@@ -3326,7 +3326,7 @@ void addEodEventProgram(const RoseBuildImpl &build, build_context &bc,
bc.roleStateIndices, prog_build,
build.eod_event_literal_id, edge_list,
false);
program.add_block(move(block));
program.add_block(std::move(block));
}
static
@@ -3715,7 +3715,7 @@ bytecode_ptr<RoseEngine> RoseBuildImpl::buildFinalEngine(u32 minWidth) {
drproto.get(), eproto.get(), sbproto.get());
auto eod_prog = makeEodProgram(*this, bc, prog_build, eodNfaIterOffset);
proto.eodProgramOffset = writeProgram(bc, move(eod_prog));
proto.eodProgramOffset = writeProgram(bc, std::move(eod_prog));
size_t longLitStreamStateRequired = 0;
proto.longLitTableOffset
@@ -3734,11 +3734,11 @@ bytecode_ptr<RoseEngine> RoseBuildImpl::buildFinalEngine(u32 minWidth) {
writeLogicalInfo(rm, bc.engine_blob, proto);
auto flushComb_prog = makeFlushCombProgram(proto);
proto.flushCombProgramOffset = writeProgram(bc, move(flushComb_prog));
proto.flushCombProgramOffset = writeProgram(bc, std::move(flushComb_prog));
auto lastFlushComb_prog = makeLastFlushCombProgram(proto);
proto.lastFlushCombProgramOffset =
writeProgram(bc, move(lastFlushComb_prog));
writeProgram(bc, std::move(lastFlushComb_prog));
// Build anchored matcher.
auto atable = buildAnchoredMatcher(*this, fragments, anchored_dfas);
@@ -3882,7 +3882,7 @@ bytecode_ptr<RoseEngine> RoseBuildImpl::buildFinalEngine(u32 minWidth) {
bc.engine_blob.write_bytes(engine.get());
// Add a small write engine if appropriate.
engine = addSmallWriteEngine(*this, bc.resources, move(engine));
engine = addSmallWriteEngine(*this, bc.resources, std::move(engine));
DEBUG_PRINTF("rose done %p\n", engine.get());

View File

@@ -1782,7 +1782,7 @@ bytecode_ptr<RoseEngine> RoseBuildImpl::buildRose(u32 minWidth) {
/* transfer mpv outfix to main queue */
if (mpv_outfix) {
outfixes.emplace_back(move(*mpv_outfix));
outfixes.emplace_back(std::move(*mpv_outfix));
mpv_outfix = nullptr;
}

View File

@@ -212,7 +212,7 @@ void convertFloodProneSuffix(RoseBuildImpl &tbi, RoseVertex v, u32 lit_id,
// Apply the NFA.
assert(!g[v].suffix);
g[v].suffix.graph = move(h);
g[v].suffix.graph = std::move(h);
g[v].reports.clear();
// Swap v's literal for a shorter one.

View File

@@ -464,7 +464,7 @@ void findFloodReach(const RoseBuildImpl &tbi, const RoseVertex v,
namespace {
struct LookProto {
LookProto(s32 offset_in, CharReach reach_in)
: offset(offset_in), reach(move(reach_in)) {}
: offset(offset_in), reach(std::move(reach_in)) {}
s32 offset;
CharReach reach;
};

View File

@@ -738,7 +738,7 @@ void addFragmentLiteral(const RoseBuildImpl &build, MatcherProto &mp,
const auto &groups = f.groups;
mp.lits.emplace_back(move(s_final), nocase, noruns, f.fragment_id,
mp.lits.emplace_back(std::move(s_final), nocase, noruns, f.fragment_id,
groups, msk, cmp);
}
@@ -936,7 +936,7 @@ buildFloatingMatcherProto(const RoseBuildImpl &build,
throw CompileError("Unable to generate literal matcher proto.");
}
return std::make_unique<LitProto>(move(proto), mp.accel_lits);
return std::make_unique<LitProto>(std::move(proto), mp.accel_lits);
}
unique_ptr<LitProto>
@@ -964,7 +964,7 @@ buildDelayRebuildMatcherProto(const RoseBuildImpl &build,
throw CompileError("Unable to generate literal matcher proto.");
}
return std::make_unique<LitProto>(move(proto), mp.accel_lits);
return std::make_unique<LitProto>(std::move(proto), mp.accel_lits);
}
unique_ptr<LitProto>
@@ -1021,7 +1021,7 @@ buildSmallBlockMatcherProto(const RoseBuildImpl &build,
throw CompileError("Unable to generate literal matcher proto.");
}
return std::make_unique<LitProto>(move(proto), mp.accel_lits);
return std::make_unique<LitProto>(std::move(proto), mp.accel_lits);
}
unique_ptr<LitProto>
@@ -1046,7 +1046,7 @@ buildEodAnchoredMatcherProto(const RoseBuildImpl &build,
throw CompileError("Unable to generate literal matcher proto.");
}
return std::make_unique<LitProto>(move(proto), mp.accel_lits);
return std::make_unique<LitProto>(std::move(proto), mp.accel_lits);
}
} // namespace ue2

View File

@@ -1442,7 +1442,7 @@ void mergeLeftfixesVariableLag(RoseBuildImpl &build) {
vector<vector<left_id>> chunks;
for (auto &raw_group : engine_groups | map_values) {
chunk(move(raw_group), &chunks, MERGE_GROUP_SIZE_MAX);
chunk(std::move(raw_group), &chunks, MERGE_GROUP_SIZE_MAX);
}
engine_groups.clear();
@@ -1511,7 +1511,7 @@ namespace {
struct DedupeLeftKey {
DedupeLeftKey(const RoseBuildImpl &build,
flat_set<pair<size_t, u32>> preds_in, const left_id &left)
: left_hash(hashLeftfix(left)), preds(move(preds_in)),
: left_hash(hashLeftfix(left)), preds(std::move(preds_in)),
transient(contains(build.transient, left)) {
}
@@ -1599,7 +1599,7 @@ void dedupeLeftfixesVariableLag(RoseBuildImpl &build) {
continue;
}
}
engine_groups[DedupeLeftKey(build, move(preds), left)].emplace_back(left);
engine_groups[DedupeLeftKey(build, std::move(preds), left)].emplace_back(left);
}
/* We don't bother chunking as we expect deduping to be successful if the
@@ -2048,7 +2048,7 @@ void mergeCastleLeftfixes(RoseBuildImpl &build) {
vector<vector<left_id>> chunks;
for (auto &raw_group : by_reach | map_values) {
chunk(move(raw_group), &chunks, MERGE_CASTLE_GROUP_SIZE_MAX);
chunk(std::move(raw_group), &chunks, MERGE_CASTLE_GROUP_SIZE_MAX);
}
by_reach.clear();
@@ -2429,7 +2429,7 @@ void pairwiseDfaMerge(vector<RawDfa *> &dfas,
RawDfa *dfa_ptr = rdfa.get();
dfa_mapping[dfa_ptr] = dfa_mapping[*it];
dfa_mapping.erase(*it);
winner.proto = move(rdfa);
winner.proto = std::move(rdfa);
mergeOutfixInfo(winner, victim);
@@ -2546,7 +2546,7 @@ void mergeOutfixCombo(RoseBuildImpl &tbi, const ReportManager &rm,
// Transform this outfix into a DFA and add it to the merge set.
dfa_mapping[rdfa.get()] = it - tbi.outfixes.begin();
dfas.emplace_back(rdfa.get());
outfix.proto = move(rdfa);
outfix.proto = std::move(rdfa);
new_dfas++;
}
}

View File

@@ -135,7 +135,7 @@ RoseProgram::iterator RoseProgram::insert(RoseProgram::iterator it,
assert(it != end());
assert(prog.back()->code() == ROSE_INSTR_END);
return prog.insert(it, move(ri));
return prog.insert(it, std::move(ri));
}
RoseProgram::iterator RoseProgram::insert(RoseProgram::iterator it,
@@ -183,7 +183,7 @@ void RoseProgram::add_before_end(RoseProgram &&block) {
return;
}
insert(prev(prog.end()), move(block));
insert(prev(prog.end()), std::move(block));
}
void RoseProgram::add_block(RoseProgram &&block) {
@@ -209,7 +209,7 @@ void RoseProgram::replace(Iter it, std::unique_ptr<RoseInstruction> ri) {
assert(!prog.empty());
const RoseInstruction *old_ptr = it->get();
*it = move(ri);
*it = std::move(ri);
update_targets(prog.begin(), prog.end(), old_ptr, it->get());
}
@@ -307,19 +307,19 @@ void addEnginesEodProgram(u32 eodNfaIterOffset, RoseProgram &program) {
RoseProgram block;
block.add_before_end(std::make_unique<RoseInstrEnginesEod>(eodNfaIterOffset));
program.add_block(move(block));
program.add_block(std::move(block));
}
void addSuffixesEodProgram(RoseProgram &program) {
RoseProgram block;
block.add_before_end(std::make_unique<RoseInstrSuffixesEod>());
program.add_block(move(block));
program.add_block(std::move(block));
}
void addMatcherEodProgram(RoseProgram &program) {
RoseProgram block;
block.add_before_end(std::make_unique<RoseInstrMatcherEod>());
program.add_block(move(block));
program.add_block(std::move(block));
}
void addFlushCombinationProgram(RoseProgram &program) {
@@ -359,7 +359,7 @@ void makeRoleCheckLeftfix(const RoseBuildImpl &build,
build.g[v].left.leftfix_report,
end_inst);
}
program.add_before_end(move(ri));
program.add_before_end(std::move(ri));
}
static
@@ -394,7 +394,7 @@ void makeAnchoredLiteralDelay(const RoseBuildImpl &build,
const auto *end_inst = program.end_instruction();
auto ri = std::make_unique<RoseInstrAnchoredDelay>(groups, anch_id, end_inst);
program.add_before_end(move(ri));
program.add_before_end(std::move(ri));
}
static
@@ -404,7 +404,7 @@ void makeDedupe(const ReportManager &rm, const Report &report,
auto ri =
std::make_unique<RoseInstrDedupe>(report.quashSom, rm.getDkey(report),
report.offsetAdjust, end_inst);
program.add_before_end(move(ri));
program.add_before_end(std::move(ri));
}
static
@@ -414,7 +414,7 @@ void makeDedupeSom(const ReportManager &rm, const Report &report,
auto ri = std::make_unique<RoseInstrDedupeSom>(report.quashSom,
rm.getDkey(report),
report.offsetAdjust, end_inst);
program.add_before_end(move(ri));
program.add_before_end(std::move(ri));
}
static
@@ -522,11 +522,11 @@ void addLogicalSetRequired(const Report &report, ReportManager &rm,
// set matching status of current lkey
auto risl = std::make_unique<RoseInstrSetLogical>(report.lkey,
report.offsetAdjust);
program.add_before_end(move(risl));
program.add_before_end(std::move(risl));
// set current lkey's corresponding ckeys active, pending to check
for (auto ckey : rm.getRelateCKeys(report.lkey)) {
auto risc = std::make_unique<RoseInstrSetCombination>(ckey);
program.add_before_end(move(risc));
program.add_before_end(std::move(risc));
}
}
@@ -543,14 +543,14 @@ void makeReport(const RoseBuildImpl &build, const ReportID id,
if (report.minOffset > 0 || report.maxOffset < MAX_OFFSET) {
auto ri = std::make_unique<RoseInstrCheckBounds>(report.minOffset,
report.maxOffset, end_inst);
report_block.add_before_end(move(ri));
report_block.add_before_end(std::move(ri));
}
// If this report has an exhaustion key, we can check it in the program
// rather than waiting until we're in the callback adaptor.
if (report.ekey != INVALID_EKEY) {
auto ri = std::make_unique<RoseInstrCheckExhausted>(report.ekey, end_inst);
report_block.add_before_end(move(ri));
report_block.add_before_end(std::move(ri));
}
// External SOM reports that aren't passthrough need their SOM value
@@ -559,7 +559,7 @@ void makeReport(const RoseBuildImpl &build, const ReportID id,
report.type != EXTERNAL_CALLBACK_SOM_PASS) {
auto ri = std::make_unique<RoseInstrSomFromReport>();
writeSomOperation(report, &ri->som);
report_block.add_before_end(move(ri));
report_block.add_before_end(std::move(ri));
}
// Min length constraint.
@@ -567,7 +567,7 @@ void makeReport(const RoseBuildImpl &build, const ReportID id,
assert(build.hasSom);
auto ri = std::make_unique<RoseInstrCheckMinLength>(
report.offsetAdjust, report.minLength, end_inst);
report_block.add_before_end(move(ri));
report_block.add_before_end(std::move(ri));
}
if (report.quashSom) {
@@ -650,11 +650,11 @@ void makeReport(const RoseBuildImpl &build, const ReportID id,
if (has_som) {
auto ri = std::make_unique<RoseInstrReportSomAware>();
writeSomOperation(report, &ri->som);
report_block.add_before_end(move(ri));
report_block.add_before_end(std::move(ri));
} else {
auto ri = std::make_unique<RoseInstrReportSomInt>();
writeSomOperation(report, &ri->som);
report_block.add_before_end(move(ri));
report_block.add_before_end(std::move(ri));
}
break;
case INTERNAL_ROSE_CHAIN: {
@@ -715,7 +715,7 @@ void makeReport(const RoseBuildImpl &build, const ReportID id,
throw CompileError("Unable to generate bytecode.");
}
program.add_block(move(report_block));
program.add_block(std::move(report_block));
}
static
@@ -745,7 +745,7 @@ void makeRoleReports(const RoseBuildImpl &build,
for (ReportID id : g[v].reports) {
makeReport(build, id, report_som, report_block);
}
program.add_before_end(move(report_block));
program.add_before_end(std::move(report_block));
}
static
@@ -816,7 +816,7 @@ void makeCheckLiteralInstruction(const rose_literal_id &lit,
ri = std::make_unique<RoseInstrCheckMedLit>(lit.s.get_string(),
end_inst);
}
program.add_before_end(move(ri));
program.add_before_end(std::move(ri));
return;
}
@@ -834,7 +834,7 @@ void makeCheckLiteralInstruction(const rose_literal_id &lit,
} else {
ri = std::make_unique<RoseInstrCheckLongLit>(lit.s.get_string(), end_inst);
}
program.add_before_end(move(ri));
program.add_before_end(std::move(ri));
}
static
@@ -850,7 +850,7 @@ void makeRoleCheckNotHandled(ProgramBuild &prog_build, RoseVertex v,
const auto *end_inst = program.end_instruction();
auto ri = std::make_unique<RoseInstrCheckNotHandled>(handled_key, end_inst);
program.add_before_end(move(ri));
program.add_before_end(std::move(ri));
}
static
@@ -979,7 +979,7 @@ bool makeRoleByte(const vector<LookEntry> &look, RoseProgram &program) {
const auto *end_inst = program.end_instruction();
auto ri = std::make_unique<RoseInstrCheckByte>(andmask_u8, cmpmask_u8, flip,
checkbyte_offset, end_inst);
program.add_before_end(move(ri));
program.add_before_end(std::move(ri));
return true;
}
return false;
@@ -1011,7 +1011,7 @@ bool makeRoleMask(const vector<LookEntry> &look, RoseProgram &program) {
const auto *end_inst = program.end_instruction();
auto ri = std::make_unique<RoseInstrCheckMask>(and_mask, cmp_mask, neg_mask,
base_offset, end_inst);
program.add_before_end(move(ri));
program.add_before_end(std::move(ri));
return true;
}
return false;
@@ -1066,7 +1066,7 @@ bool makeRoleMask32(const vector<LookEntry> &look,
const auto *end_inst = program.end_instruction();
auto ri = std::make_unique<RoseInstrCheckMask32>(and_mask, cmp_mask, neg_mask,
base_offset, end_inst);
program.add_before_end(move(ri));
program.add_before_end(std::move(ri));
return true;
}
@@ -1109,7 +1109,7 @@ bool makeRoleMask64(const vector<LookEntry> &look,
const auto *end_inst = program.end_instruction();
auto ri = std::make_unique<RoseInstrCheckMask64>(and_mask, cmp_mask, neg_mask,
base_offset, end_inst);
program.add_before_end(move(ri));
program.add_before_end(std::move(ri));
return true;
}
@@ -1474,7 +1474,7 @@ bool makeRoleShufti(const vector<LookEntry> &look, RoseProgram &program,
}
}
assert(ri);
program.add_before_end(move(ri));
program.add_before_end(std::move(ri));
return true;
}
@@ -1497,7 +1497,7 @@ void makeLookaroundInstruction(const vector<LookEntry> &look,
const CharReach &reach = look.begin()->reach;
auto ri = std::make_unique<RoseInstrCheckSingleLookaround>(offset, reach,
program.end_instruction());
program.add_before_end(move(ri));
program.add_before_end(std::move(ri));
return;
}
@@ -1519,7 +1519,7 @@ void makeLookaroundInstruction(const vector<LookEntry> &look,
auto ri = std::make_unique<RoseInstrCheckLookaround>(look,
program.end_instruction());
program.add_before_end(move(ri));
program.add_before_end(std::move(ri));
}
static
@@ -1774,7 +1774,7 @@ bool makeRoleMultipathShufti(const vector<vector<LookEntry>> &multi_look,
auto ri = std::make_unique<RoseInstrCheckMultipathShufti16x8>
(nib_mask, bucket_select_lo, data_select_mask, hi_bits_mask,
lo_bits_mask, neg_mask, base_offset, last_start, end_inst);
program.add_before_end(move(ri));
program.add_before_end(std::move(ri));
} else if (multi_len == 32) {
neg_mask &= 0xffffffff;
assert(!(hi_bits_mask & ~0xffffffffULL));
@@ -1784,20 +1784,20 @@ bool makeRoleMultipathShufti(const vector<vector<LookEntry>> &multi_look,
(hi_mask, lo_mask, bucket_select_lo, data_select_mask,
hi_bits_mask, lo_bits_mask, neg_mask, base_offset,
last_start, end_inst);
program.add_before_end(move(ri));
program.add_before_end(std::move(ri));
} else {
auto ri = std::make_unique<RoseInstrCheckMultipathShufti32x16>
(hi_mask, lo_mask, bucket_select_hi, bucket_select_lo,
data_select_mask, hi_bits_mask, lo_bits_mask, neg_mask,
base_offset, last_start, end_inst);
program.add_before_end(move(ri));
program.add_before_end(std::move(ri));
}
} else {
auto ri = std::make_unique<RoseInstrCheckMultipathShufti64>
(hi_mask, lo_mask, bucket_select_lo, data_select_mask,
hi_bits_mask, lo_bits_mask, neg_mask, base_offset,
last_start, end_inst);
program.add_before_end(move(ri));
program.add_before_end(std::move(ri));
}
return true;
}
@@ -1865,10 +1865,10 @@ void makeRoleMultipathLookaround(const vector<vector<LookEntry>> &multi_look,
ordered_look.emplace_back(multi_entry);
}
auto ri = std::make_unique<RoseInstrMultipathLookaround>(move(ordered_look),
auto ri = std::make_unique<RoseInstrMultipathLookaround>(std::move(ordered_look),
last_start, start_mask,
program.end_instruction());
program.add_before_end(move(ri));
program.add_before_end(std::move(ri));
}
static
@@ -1893,7 +1893,7 @@ void makeRoleLookaround(const RoseBuildImpl &build,
vector<LookEntry> look;
vector<LookEntry> look_more;
if (!looks.empty()) {
look = move(looks.front());
look = std::move(looks.front());
}
findLookaroundMasks(build, v, look_more);
mergeLookaround(look, look_more);
@@ -2001,7 +2001,7 @@ void makeRoleInfixTriggers(const RoseBuildImpl &build,
triggers.emplace_back(g[e].rose_cancel_prev_top, lbi.queue, top);
}
addInfixTriggerInstructions(move(triggers), program);
addInfixTriggerInstructions(std::move(triggers), program);
}
@@ -2063,7 +2063,7 @@ void makeRoleEagerEodReports(const RoseBuildImpl &build,
RoseProgram block;
makeRoleReports(build, leftfix_info, needs_catchup,
target(e, build.g), block);
eod_program.add_block(move(block));
eod_program.add_block(std::move(block));
}
}
@@ -2077,7 +2077,7 @@ void makeRoleEagerEodReports(const RoseBuildImpl &build,
addCheckOnlyEodInstruction(program);
}
program.add_before_end(move(eod_program));
program.add_before_end(std::move(eod_program));
}
/** Makes a program for a role/vertex given a specific pred/in_edge. */
@@ -2124,33 +2124,33 @@ RoseProgram makeRoleProgram(const RoseBuildImpl &build,
RoseProgram reports_block;
makeRoleReports(build, leftfix_info, prog_build.needs_catchup, v,
reports_block);
effects_block.add_block(move(reports_block));
effects_block.add_block(std::move(reports_block));
RoseProgram infix_block;
makeRoleInfixTriggers(build, leftfix_info, engine_info_by_queue, v,
infix_block);
effects_block.add_block(move(infix_block));
effects_block.add_block(std::move(infix_block));
// Note: SET_GROUPS instruction must be after infix triggers, as an infix
// going dead may switch off groups.
RoseProgram groups_block;
makeRoleGroups(build.g, prog_build, v, groups_block);
effects_block.add_block(move(groups_block));
effects_block.add_block(std::move(groups_block));
RoseProgram suffix_block;
makeRoleSuffix(build, suffixes, engine_info_by_queue, v, suffix_block);
effects_block.add_block(move(suffix_block));
effects_block.add_block(std::move(suffix_block));
RoseProgram state_block;
makeRoleSetState(roleStateIndices, v, state_block);
effects_block.add_block(move(state_block));
effects_block.add_block(std::move(state_block));
// Note: EOD eager reports may generate a CHECK_ONLY_EOD instruction (if
// the program doesn't have one already).
RoseProgram eod_block;
makeRoleEagerEodReports(build, leftfix_info, prog_build.needs_catchup, v,
eod_block);
effects_block.add_block(move(eod_block));
effects_block.add_block(std::move(eod_block));
/* a 'ghost role' may do nothing if we know that its groups are already set
* - in this case we can avoid producing a program at all. */
@@ -2158,7 +2158,7 @@ RoseProgram makeRoleProgram(const RoseBuildImpl &build,
return {};
}
program.add_before_end(move(effects_block));
program.add_before_end(std::move(effects_block));
return program;
}
@@ -2204,7 +2204,7 @@ RoseProgram assembleProgramBlocks(vector<RoseProgram> &&blocks_in) {
continue;
}
blocks.emplace_back(move(block));
blocks.emplace_back(std::move(block));
seen.emplace(blocks.back());
}
@@ -2219,10 +2219,10 @@ RoseProgram assembleProgramBlocks(vector<RoseProgram> &&blocks_in) {
if (!prog.empty() && reads_work_done_flag(block)) {
RoseProgram clear_block;
clear_block.add_before_end(std::make_unique<RoseInstrClearWorkDone>());
prog.add_block(move(clear_block));
prog.add_block(std::move(clear_block));
}
prog.add_block(move(block));
prog.add_block(std::move(block));
}
return prog;
@@ -2265,7 +2265,7 @@ RoseProgram makeLiteralProgram(const RoseBuildImpl &build,
engine_info_by_queue, roleStateIndices,
prog_build, e);
if (!role_prog.empty()) {
pred_blocks[pred_state].add_block(move(role_prog));
pred_blocks[pred_state].add_block(std::move(role_prog));
}
}
@@ -2284,7 +2284,7 @@ RoseProgram makeLiteralProgram(const RoseBuildImpl &build,
auto role_prog = makeRoleProgram(build, leftfix_info, suffixes,
engine_info_by_queue, roleStateIndices,
prog_build, e);
role_programs.add_block(move(role_prog));
role_programs.add_block(std::move(role_prog));
}
if (lit_id == build.eod_event_literal_id) {
@@ -2299,8 +2299,8 @@ RoseProgram makeLiteralProgram(const RoseBuildImpl &build,
// Literal may squash groups.
makeGroupSquashInstruction(build, lit_id, unconditional_block);
role_programs.add_block(move(unconditional_block));
lit_program.add_before_end(move(role_programs));
role_programs.add_block(std::move(unconditional_block));
lit_program.add_before_end(std::move(role_programs));
return lit_program;
}
@@ -2331,10 +2331,10 @@ RoseProgram makeDelayRebuildProgram(const RoseBuildImpl &build,
makePushDelayedInstructions(build.literals, prog_build,
build.literal_info.at(lit_id).delayed_ids,
prog);
blocks.emplace_back(move(prog));
blocks.emplace_back(std::move(prog));
}
return assembleProgramBlocks(move(blocks));
return assembleProgramBlocks(std::move(blocks));
}
RoseProgram makeEodAnchorProgram(const RoseBuildImpl &build,
@@ -2361,7 +2361,7 @@ RoseProgram makeEodAnchorProgram(const RoseBuildImpl &build,
for (const auto &id : g[v].reports) {
makeReport(build, id, has_som, report_block);
}
program.add_before_end(move(report_block));
program.add_before_end(std::move(report_block));
return program;
}
@@ -2413,7 +2413,7 @@ void addIncludedJumpProgram(RoseProgram &program, u32 child_offset,
RoseProgram block;
block.add_before_end(std::make_unique<RoseInstrIncludedJump>(child_offset,
squash));
program.add_block(move(block));
program.add_block(std::move(block));
}
static
@@ -2423,7 +2423,7 @@ void addPredBlockSingle(u32 pred_state, RoseProgram &pred_block,
const auto *end_inst = pred_block.end_instruction();
pred_block.insert(begin(pred_block),
std::make_unique<RoseInstrCheckState>(pred_state, end_inst));
program.add_block(move(pred_block));
program.add_block(std::move(pred_block));
}
static
@@ -2438,7 +2438,7 @@ void addPredBlocksAny(map<u32, RoseProgram> &pred_blocks, u32 num_states,
const RoseInstruction *end_inst = sparse_program.end_instruction();
auto ri = std::make_unique<RoseInstrSparseIterAny>(num_states, keys, end_inst);
sparse_program.add_before_end(move(ri));
sparse_program.add_before_end(std::move(ri));
RoseProgram &block = pred_blocks.begin()->second;
@@ -2446,8 +2446,8 @@ void addPredBlocksAny(map<u32, RoseProgram> &pred_blocks, u32 num_states,
* blocks are being collapsed together */
stripCheckHandledInstruction(block);
sparse_program.add_before_end(move(block));
program.add_block(move(sparse_program));
sparse_program.add_before_end(std::move(block));
program.add_block(std::move(sparse_program));
}
static
@@ -2462,14 +2462,14 @@ void addPredBlocksMulti(map<u32, RoseProgram> &pred_blocks,
// BEGIN instruction.
auto ri_begin = std::make_unique<RoseInstrSparseIterBegin>(num_states, end_inst);
RoseInstrSparseIterBegin *begin_inst = ri_begin.get();
sparse_program.add_before_end(move(ri_begin));
sparse_program.add_before_end(std::move(ri_begin));
// NEXT instructions, one per pred program.
u32 prev_key = pred_blocks.begin()->first;
for (auto it = next(begin(pred_blocks)); it != end(pred_blocks); ++it) {
auto ri = std::make_unique<RoseInstrSparseIterNext>(prev_key, begin_inst,
end_inst);
sparse_program.add_before_end(move(ri));
sparse_program.add_before_end(std::move(ri));
prev_key = it->first;
}
@@ -2483,7 +2483,7 @@ void addPredBlocksMulti(map<u32, RoseProgram> &pred_blocks,
assert(dynamic_cast<const RoseInstrSparseIterBegin *>(out_it->get()) ||
dynamic_cast<const RoseInstrSparseIterNext *>(out_it->get()));
out_it = sparse_program.insert(++out_it, move(flat_prog));
out_it = sparse_program.insert(++out_it, std::move(flat_prog));
// Jump table target for this key is the beginning of the block we just
// spliced in.
@@ -2495,9 +2495,9 @@ void addPredBlocksMulti(map<u32, RoseProgram> &pred_blocks,
}
// Write the jump table back into the SPARSE_ITER_BEGIN instruction.
begin_inst->jump_table = move(jump_table);
begin_inst->jump_table = std::move(jump_table);
program.add_block(move(sparse_program));
program.add_block(std::move(sparse_program));
}
void addPredBlocks(map<u32, RoseProgram> &pred_blocks, u32 num_states,