mirror of
https://github.com/VectorCamp/vectorscan.git
synced 2025-06-28 16:41:01 +03:00
assign groups: turn pair<pair> into a tuple
This commit is contained in:
parent
bfaa0acaea
commit
7cc5346c11
@ -212,7 +212,7 @@ void assignGroupsToLiterals(RoseBuildImpl &build) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
u32 min_start_group = counter;
|
u32 min_start_group = counter;
|
||||||
priority_queue<pair<pair<s32, s32>, u32> > pq;
|
priority_queue<tuple<s32, s32, u32>> pq;
|
||||||
|
|
||||||
// Second pass: the other literals.
|
// Second pass: the other literals.
|
||||||
for (const auto &e : literals.right) {
|
for (const auto &e : literals.right) {
|
||||||
@ -225,12 +225,11 @@ void assignGroupsToLiterals(RoseBuildImpl &build) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
assert(!eligibleForAlwaysOnGroup(build, id));
|
assert(!eligibleForAlwaysOnGroup(build, id));
|
||||||
pq.push(make_pair(make_pair(-(s32)literal_info[id].vertices.size(),
|
pq.emplace(-(s32)info.vertices.size(), -(s32)lit.s.length(), id);
|
||||||
-(s32)lit.s.length()), id));
|
|
||||||
}
|
}
|
||||||
vector<u32> long_lits;
|
vector<u32> long_lits;
|
||||||
while (!pq.empty()) {
|
while (!pq.empty()) {
|
||||||
u32 id = pq.top().second;
|
u32 id = get<2>(pq.top());
|
||||||
pq.pop();
|
pq.pop();
|
||||||
UNUSED const rose_literal_id &lit = literals.right.at(id);
|
UNUSED const rose_literal_id &lit = literals.right.at(id);
|
||||||
DEBUG_PRINTF("assigning groups to lit %u (v %zu l %zu)\n", id,
|
DEBUG_PRINTF("assigning groups to lit %u (v %zu l %zu)\n", id,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user