Vous avez reçu un message "Your GitLab account has been locked ..." ? Pas d'inquiétude : lisez cet article https://docs.gricad-pages.univ-grenoble-alpes.fr/help/unlock/

Commit ca015ae4 authored by Valentin Touzeau's avatar Valentin Touzeau
Browse files

update otawa

parent e424a28f
......@@ -29,7 +29,7 @@ protected:
BasicBlock* bb = b->toBasic();
for(Block::EdgeIter edgeIter(bb->ins()); edgeIter; ++edgeIter) {
for(Block::EdgeIter edgeIter(bb->ins()); edgeIter(); ++edgeIter) {
Edge* e = *edgeIter;
Bag<icache::Access>& bag = icache::ACCESSES(e).ref();
processBag(bag);
......
......@@ -66,8 +66,8 @@ public:
inline store_t& store(void) { return m_store; }
void update(const Bag<icache::Access>& accs, t& d) {
for(auto acc = *accs; acc; acc++)
m_domain.update(acc, d);
for(auto acc = *accs; acc(); acc++)
m_domain.update(*acc, d);
}
void update(Block* v, t& d) {
......@@ -76,7 +76,7 @@ public:
t s;
// update and join along edges
for(auto e = m_graph.preds(v); e; e++) {
for(auto e = m_graph.preds(v); e(); e++) {
Block *w = e->source();
m_domain.copy(s, m_store.get(w));
......@@ -89,7 +89,7 @@ public:
// apply edge
{
const Bag<icache::Access>& accs = icache::ACCESSES(e);
const Bag<icache::Access>& accs = icache::ACCESSES(*e);
if(accs.count() > 0)
update(accs, s);
}
......@@ -192,8 +192,8 @@ private:
ai::SimpleAI<GlobalMayAdapter> ana(ada);
ana.run();
for(CFGCollection::BlockIter b(m_cfgs); b; b++)
classifyBlock(lb, ada.domain(), b, ada.store().get(b));
for(CFGCollection::BlockIter b(m_cfgs); b(); b++)
classifyBlock(lb, ada.domain(), *b, ada.store().get(*b));
//ada.store().clear();
}
......@@ -207,8 +207,8 @@ private:
Bag<icache::Access>& bAccs = icache::ACCESSES(b).ref();
GlobalMayAdapter::t save = classifyAccesses(b, focus, man, bAccs);
for(Block::EdgeIter e = b->outs(); e; e++) {
Bag<icache::Access>& eAccs = icache::ACCESSES(e).ref();
for(Block::EdgeIter e = b->outs(); e(); e++) {
Bag<icache::Access>& eAccs = icache::ACCESSES(*e).ref();
man.restart(save);
classifyAccesses(b, focus, man, eAccs);
}
......
......@@ -65,8 +65,8 @@ public:
inline store_t& store(void) { return m_store; }
void update(const Bag<icache::Access>& accs, t& d) {
for(auto acc = *accs; acc; acc++)
m_domain.update(acc, d);
for(auto acc = *accs; acc(); acc++)
m_domain.update(*acc, d);
}
void update(Block* v, t& d) {
......@@ -75,7 +75,7 @@ public:
t s;
// update and join along edges
for(auto e = m_graph.preds(v); e; e++) {
for(auto e = m_graph.preds(v); e(); e++) {
Block *w = e->source();
m_domain.copy(s, m_store.get(w));
......@@ -88,7 +88,7 @@ public:
// apply edge
{
const Bag<icache::Access>& accs = icache::ACCESSES(e);
const Bag<icache::Access>& accs = icache::ACCESSES(*e);
if(accs.count() > 0)
update(accs, s);
}
......@@ -145,13 +145,13 @@ protected:
auto start = std::chrono::system_clock::now();
std::set<const icat3::LBlock*> toRefine;
for(CFGCollection::BlockIter b(m_cfgs); b; b++) {
for(CFGCollection::BlockIter b(m_cfgs); b(); b++) {
if(!b->isBasic())
continue;
BasicBlock* bb = b->toBasic();
for(Block::EdgeIter edgeIter(bb->ins()); edgeIter; ++edgeIter) {
for(Block::EdgeIter edgeIter(bb->ins()); edgeIter(); ++edgeIter) {
Edge* e = *edgeIter;
Bag<icache::Access>& bag = icache::ACCESSES(e).ref();
processBag(toRefine, bag);
......@@ -209,8 +209,8 @@ private:
ai::SimpleAI<MayAdapter> ana(ada);
ana.run();
for(CFGCollection::BlockIter b(m_cfgs); b; b++)
classifyBlock(lb, ada.domain(), b, ada.store().get(b));
for(CFGCollection::BlockIter b(m_cfgs); b(); b++)
classifyBlock(lb, ada.domain(), *b, ada.store().get(*b));
ada.store().clear();
}
......@@ -224,8 +224,8 @@ private:
Bag<icache::Access>& bAccs = icache::ACCESSES(b).ref();
MayAdapter::t save = classifyAccesses(b, focus, man, bAccs);
for(Block::EdgeIter e = b->outs(); e; e++) {
Bag<icache::Access>& eAccs = icache::ACCESSES(e).ref();
for(Block::EdgeIter e = b->outs(); e(); e++) {
Bag<icache::Access>& eAccs = icache::ACCESSES(*e).ref();
man.restart(save);
classifyAccesses(b, focus, man, eAccs);
}
......@@ -239,20 +239,20 @@ private:
for(int i = 0; i < accs.size(); ++i) {
icat3::LBlock* lb = icat3::LBLOCK(accs[i]);
if(lb == focus) {
// if(logFor(LOG_BLOCK)) {
// log << "\t\tFunction " << b->cfg()->label() << ", ";
// log << const_cast<Block*>(b) << ": " << io::endl;
// log << "\t\t\tAccess (" << accs[i] << ") is ";
// }
if(logFor(LOG_BLOCK)) {
log << "\t\tFunction " << b->cfg()->label() << ", ";
log << const_cast<Block*>(b) << ": " << io::endl;
log << "\t\t\tAccess (" << accs[i] << ") is ";
}
if(man.alwaysMiss()) {
MISS_CATEGORY(accs[i]) = MissCategory::AM;
// if(logFor(LOG_BLOCK))
// log << "AM" << elm::io::endl;
if(logFor(LOG_BLOCK))
log << "AM" << elm::io::endl;
}
else {
MISS_CATEGORY(accs[i]) = MissCategory::NC;
// if(logFor(LOG_BLOCK))
// log << "NC" << elm::io::endl;
if(logFor(LOG_BLOCK))
log << "NC" << elm::io::endl;
}
}
man.update(accs[i]);
......
......@@ -66,8 +66,8 @@ public:
inline store_t& store(void) { return m_store; }
void update(const Bag<icache::Access>& accs, t& d) {
for(auto acc = *accs; acc; acc++)
m_domain.update(acc, d);
for(auto acc = *accs; acc(); acc++)
m_domain.update(*acc, d);
}
void update(Block* v, t& d) {
......@@ -76,7 +76,7 @@ public:
t s;
// update and join along edges
for(auto e = m_graph.preds(v); e; e++) {
for(auto e = m_graph.preds(v); e(); e++) {
Block *w = e->source();
m_domain.copy(s, m_store.get(w));
......@@ -89,7 +89,7 @@ public:
// apply edge
{
const Bag<icache::Access>& accs = icache::ACCESSES(e);
const Bag<icache::Access>& accs = icache::ACCESSES(*e);
if(accs.count() > 0)
update(accs, s);
}
......@@ -192,8 +192,8 @@ private:
ai::SimpleAI<GlobalMustAdapter> ana(ada);
ana.run();
for(CFGCollection::BlockIter b(m_cfgs); b; b++)
classifyBlock(lb, ada.domain(), b, ada.store().get(b));
for(CFGCollection::BlockIter b(m_cfgs); b(); b++)
classifyBlock(lb, ada.domain(), *b, ada.store().get(*b));
//ada.store().clear();
}
......@@ -207,8 +207,8 @@ private:
Bag<icache::Access>& bAccs = icache::ACCESSES(b).ref();
GlobalMustAdapter::t save = classifyAccesses(b, focus, man, bAccs);
for(Block::EdgeIter e = b->outs(); e; e++) {
Bag<icache::Access>& eAccs = icache::ACCESSES(e).ref();
for(Block::EdgeIter e = b->outs(); e(); e++) {
Bag<icache::Access>& eAccs = icache::ACCESSES(*e).ref();
man.restart(save);
classifyAccesses(b, focus, man, eAccs);
}
......
......@@ -65,8 +65,8 @@ public:
inline store_t& store(void) { return m_store; }
void update(const Bag<icache::Access>& accs, t& d) {
for(auto acc = *accs; acc; acc++)
m_domain.update(acc, d);
for(auto acc = *accs; acc(); acc++)
m_domain.update(*acc, d);
}
void update(Block* v, t& d) {
......@@ -75,7 +75,7 @@ public:
t s;
// update and join along edges
for(auto e = m_graph.preds(v); e; e++) {
for(auto e = m_graph.preds(v); e(); e++) {
Block *w = e->source();
m_domain.copy(s, m_store.get(w));
......@@ -88,7 +88,7 @@ public:
// apply edge
{
const Bag<icache::Access>& accs = icache::ACCESSES(e);
const Bag<icache::Access>& accs = icache::ACCESSES(*e);
if(accs.count() > 0)
update(accs, s);
}
......@@ -145,13 +145,13 @@ protected:
auto start = std::chrono::system_clock::now();
std::set<const icat3::LBlock*> toRefine;
for(CFGCollection::BlockIter b(m_cfgs); b; b++) {
for(CFGCollection::BlockIter b(m_cfgs); b(); b++) {
if(!b->isBasic())
continue;
BasicBlock* bb = b->toBasic();
for(Block::EdgeIter edgeIter(bb->ins()); edgeIter; ++edgeIter) {
for(Block::EdgeIter edgeIter(bb->ins()); edgeIter(); ++edgeIter) {
Edge* e = *edgeIter;
Bag<icache::Access>& bag = icache::ACCESSES(e).ref();
processBag(toRefine, bag);
......@@ -209,8 +209,8 @@ private:
ai::SimpleAI<MustAdapter> ana(ada);
ana.run();
for(CFGCollection::BlockIter b(m_cfgs); b; b++)
classifyBlock(lb, ada.domain(), b, ada.store().get(b));
for(CFGCollection::BlockIter b(m_cfgs); b(); b++)
classifyBlock(lb, ada.domain(), *b, ada.store().get(*b));
ada.store().clear();
}
......@@ -224,8 +224,8 @@ private:
Bag<icache::Access>& bAccs = icache::ACCESSES(b).ref();
MustAdapter::t save = classifyAccesses(b, focus, man, bAccs);
for(Block::EdgeIter e = b->outs(); e; e++) {
Bag<icache::Access>& eAccs = icache::ACCESSES(e).ref();
for(Block::EdgeIter e = b->outs(); *e; e++) {
Bag<icache::Access>& eAccs = icache::ACCESSES(*e).ref();
man.restart(save);
classifyAccesses(b, focus, man, eAccs);
}
......@@ -239,20 +239,20 @@ private:
for(int i = 0; i < accs.size(); ++i) {
icat3::LBlock* lb = icat3::LBLOCK(accs[i]);
if(lb == focus) {
// if(logFor(LOG_BLOCK)) {
// log << "\t\tFunction " << b->cfg()->label() << ", ";
// log << const_cast<Block*>(b) << ": " << io::endl;
// log << "\t\t\tAccess (" << accs[i] << ") is ";
// }
if(logFor(LOG_BLOCK)) {
log << "\t\tFunction " << b->cfg()->label() << ", ";
log << const_cast<Block*>(b) << ": " << io::endl;
log << "\t\t\tAccess (" << accs[i] << ") is ";
}
if(man.alwaysHit()) {
HIT_CATEGORY(accs[i]) = HitCategory::AH;
// if(logFor(LOG_BLOCK))
// log << "AH" << elm::io::endl;
if(logFor(LOG_BLOCK))
log << "AH" << elm::io::endl;
}
else {
HIT_CATEGORY(accs[i]) = HitCategory::NC;
// if(logFor(LOG_BLOCK))
// log << "NC" << elm::io::endl;
if(logFor(LOG_BLOCK))
log << "NC" << elm::io::endl;
}
}
man.update(accs[i]);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment