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