Commit a4019af3 authored by otawa's avatar otawa

Merge remote-tracking branch 'origin/update_otawa' into dev

parents 9b4cac53 6f22e5ba
......@@ -32,7 +32,7 @@ void ExistHitPrevAdapter::update(Block *v, t& d)
t s;
// update and join along edges
for(auto e = _graph.preds(v); e; e++) {
for(auto e = _graph.preds(v); e(); e++) {
Block *w = e->source();
_domain.copy(s, _store.get(w));
......@@ -47,7 +47,7 @@ void ExistHitPrevAdapter::update(Block *v, t& d)
// 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);
}
......
......@@ -45,8 +45,8 @@ void ExistHitPrevAnalysis::setup(WorkSpace* ws)
auto start = std::chrono::system_clock::now();
// prepare containers
for(CFGCollection::BlockIter b(_cfgs); b; b++)
(*EXIST_HIT_PREV_IN(b)).configure(*_coll);
for(CFGCollection::BlockIter b(_cfgs); b(); b++)
(*EXIST_HIT_PREV_IN(*b)).configure(*_coll);
// compute ACS
for(int i = 0; i < _coll->cache()->setCount(); i++) {
......@@ -65,8 +65,8 @@ void ExistHitPrevAnalysis::setup(WorkSpace* ws)
void ExistHitPrevAnalysis::destroy(WorkSpace*)
{
for(CFGCollection::BlockIter b(_cfgs); b; b++)
EXIST_HIT_PREV_IN(b).remove();
for(CFGCollection::BlockIter b(_cfgs); b(); b++)
EXIST_HIT_PREV_IN(*b).remove();
}
void ExistHitPrevAnalysis::processSet(int set, WorkSpace* ws)
......@@ -76,11 +76,11 @@ void ExistHitPrevAnalysis::processSet(int set, WorkSpace* ws)
ai::SimpleAI<ExistHitPrevAdapter> ana(ada);
ana.run();
// store the results
for(CFGCollection::BlockIter b(_cfgs); b; b++)
for(CFGCollection::BlockIter b(_cfgs); b(); b++)
if(b->isBasic()) {
ada.domain().copy((*EXIST_HIT_PREV_IN(b))[set], ada.store().get(b));
ada.domain().copy((*EXIST_HIT_PREV_IN(*b))[set], ada.store().get(*b));
if(logFor(LOG_BLOCK))
log << "\t\t\t" << *b << ": " << ada.domain().print(ada.store().get(b)) << io::endl;
log << "\t\t\t" << *b << ": " << ada.domain().print(ada.store().get(*b)) << io::endl;
}
}
......
......@@ -32,7 +32,7 @@ void ExistHitPrevOAdapter::update(Block *v, t& d)
t s;
// update and join along edges
for(auto e = _graph.preds(v); e; e++) {
for(auto e = _graph.preds(v); e(); e++) {
Block *w = e->source();
_domain.copy(s, _store.get(w));
......@@ -47,7 +47,7 @@ void ExistHitPrevOAdapter::update(Block *v, t& d)
// 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);
}
......
......@@ -45,8 +45,8 @@ void ExistHitPrevOAnalysis::setup(WorkSpace* ws)
auto start = std::chrono::system_clock::now();
// prepare containers
for(CFGCollection::BlockIter b(_cfgs); b; b++)
(*EXIST_HIT_PREV_IN(b)).configure(*_coll);
for(CFGCollection::BlockIter b(_cfgs); b(); b++)
(*EXIST_HIT_PREV_IN(*b)).configure(*_coll);
// compute ACS
for(int i = 0; i < _coll->cache()->setCount(); i++) {
......@@ -65,8 +65,8 @@ void ExistHitPrevOAnalysis::setup(WorkSpace* ws)
void ExistHitPrevOAnalysis::destroy(WorkSpace*)
{
for(CFGCollection::BlockIter b(_cfgs); b; b++)
EXIST_HIT_PREV_IN(b).remove();
for(CFGCollection::BlockIter b(_cfgs); b(); b++)
EXIST_HIT_PREV_IN(*b).remove();
}
void ExistHitPrevOAnalysis::processSet(int set, WorkSpace* ws)
......@@ -76,11 +76,11 @@ void ExistHitPrevOAnalysis::processSet(int set, WorkSpace* ws)
ai::SimpleAI<ExistHitPrevOAdapter> ana(ada);
ana.run();
// store the results
for(CFGCollection::BlockIter b(_cfgs); b; b++)
for(CFGCollection::BlockIter b(_cfgs); b(); b++)
if(b->isBasic()) {
ada.domain().copy((*EXIST_HIT_PREV_IN(b))[set], ada.store().get(b));
ada.domain().copy((*EXIST_HIT_PREV_IN(*b))[set], ada.store().get(*b));
if(logFor(LOG_BLOCK))
log << "\t\t\t" << *b << ": " << ada.domain().print(ada.store().get(b)) << io::endl;
log << "\t\t\t" << *b << ": " << ada.domain().print(ada.store().get(*b)) << io::endl;
}
}
......
......@@ -38,7 +38,7 @@ void ExistHitPrevUAdapter::update(Block *v, t& d)
bool first = true;
// update and join along edges
for(auto e = _graph.preds(v); e; e++) {
for(auto e = _graph.preds(v); e(); e++) {
Block *w = e->source();
_domain.copy(s, _store.get(w));
......@@ -58,7 +58,7 @@ void ExistHitPrevUAdapter::update(Block *v, t& d)
// 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);
}
......
......@@ -45,8 +45,8 @@ void ExistHitPrevUAnalysis::setup(WorkSpace* ws)
auto start = std::chrono::system_clock::now();
// prepare containers
for(CFGCollection::BlockIter b(_cfgs); b; b++)
(*EXIST_HIT_PREV_IN(b)).configure(*_coll);
for(CFGCollection::BlockIter b(_cfgs); b(); b++)
(*EXIST_HIT_PREV_IN(*b)).configure(*_coll);
// compute ACS
for(int i = 0; i < _coll->cache()->setCount(); i++) {
......@@ -65,8 +65,8 @@ void ExistHitPrevUAnalysis::setup(WorkSpace* ws)
void ExistHitPrevUAnalysis::destroy(WorkSpace*)
{
for(CFGCollection::BlockIter b(_cfgs); b; b++)
EXIST_HIT_PREV_IN(b).remove();
for(CFGCollection::BlockIter b(_cfgs); b(); b++)
EXIST_HIT_PREV_IN(*b).remove();
}
void ExistHitPrevUAnalysis::processSet(int set, WorkSpace* ws)
......@@ -76,11 +76,11 @@ void ExistHitPrevUAnalysis::processSet(int set, WorkSpace* ws)
ai::SimpleAI<ExistHitPrevUAdapter> ana(ada);
ana.run();
// store the results
for(CFGCollection::BlockIter b(_cfgs); b; b++)
for(CFGCollection::BlockIter b(_cfgs); b(); b++)
if(b->isBasic()) {
ada.domain().copy((*EXIST_HIT_PREV_IN(b))[set], ada.store().get(b));
ada.domain().copy((*EXIST_HIT_PREV_IN(*b))[set], ada.store().get(*b));
if(logFor(LOG_BLOCK))
log << "\t\t\t" << *b << ": " << ada.domain().print(ada.store().get(b)) << io::endl;
log << "\t\t\t" << *b << ": " << ada.domain().print(ada.store().get(*b)) << io::endl;
}
}
......
......@@ -100,7 +100,7 @@ protected:
BasicBlock* bb = b->toBasic();
for(Block::EdgeIter edgeIter(bb->ins()); edgeIter; ++edgeIter) {
for(Block::EdgeIter edgeIter(bb->ins()); edgeIter(); ++edgeIter) {
const Edge* e = *edgeIter;
const Bag<icache::Access>& bag = otawa::icache::ACCESSES(e);
processBag(ws, cfg, bag, bb);
......
......@@ -36,7 +36,7 @@ protected:
virtual void processBB(WorkSpace*, CFG* cfg, Block *v)
{
for(Block::EdgeIter e = v->outs(); e; e++) {
for(Block::EdgeIter e = v->outs(); e(); e++) {
if(logFor(LOG_BLOCK))
log << "\t\t\t\tprocess " << *e << io::endl;
if(v->isSynth() && v->toSynth()->callee())
......@@ -46,7 +46,7 @@ protected:
//otawa::sgraph::LoopIdentifier loopv = otawa::sgraph::LoopIdentifier::loopOf(v);
///otawa::sgraph::LoopIdentifier loope = otawa::sgraph::LoopIdentifier::loopOf(e.sink());
processAccesses(*icache::ACCESSES(v));
processAccesses(*icache::ACCESSES(e));
processAccesses(*icache::ACCESSES(*e));
}
}
......
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