rose: replace RoseLiteralMap use of bimap

This apoproach is simpler and more efficient for cases with large
numbers of literals.
This commit is contained in:
Justin Viiret
2017-04-26 15:12:27 +10:00
committed by Matthew Barr
parent a75b2ba2e5
commit 8b9328fe9e
15 changed files with 198 additions and 154 deletions

View File

@@ -235,7 +235,7 @@ void convertFloodProneSuffix(RoseBuildImpl &tbi, RoseVertex v, u32 lit_id,
static
size_t findFloodProneSuffixLen(const RoseBuildImpl &tbi) {
size_t numLiterals = 0;
for (const rose_literal_id &lit : tbi.literals.right | map_values) {
for (const rose_literal_id &lit : tbi.literals) {
if (lit.delay) {
continue; // delay ids are virtual-ish
}
@@ -293,7 +293,7 @@ void convertFloodProneSuffixes(RoseBuildImpl &tbi) {
}
u32 lit_id = *g[v].literals.begin();
const rose_literal_id &lit = tbi.literals.right.at(lit_id);
const rose_literal_id &lit = tbi.literals.at(lit_id);
// anchored or delayed literals need thought.
if (lit.table != ROSE_FLOATING || lit.delay) {