Commit 7fb2238d authored by Ballabriga Clément's avatar Ballabriga Clément
Browse files

begin working on otawav2 compatible version

parent 075a67cd
......@@ -18,7 +18,7 @@ namespace otawa {
namespace poly {
using namespace otawa;
using namespace otawa::util;
//using namespace otawa::util;
namespace PPL = Parma_Polyhedra_Library;
using Variable = PPL::Variable;
......@@ -137,7 +137,7 @@ class PPLInput {
*/
class PPLSummary {
public:
genstruct::Vector<Ident> _damaged; ///< The list of output (or side-effects) variables (registers or pointers)
elm::Vector<Ident> _damaged; ///< The list of output (or side-effects) variables (registers or pointers)
// genstruct::Vector<Ident> _inputs; ///< The list of inputs for the function
inline bool equals(const PPLSummary &b) const {
return true;
......@@ -148,13 +148,13 @@ class PPLSummary {
class Mapping {
public:
bool includes(const Mapping &src) const {
for (MyHTable<Ident, guid_t, HashIdent>::PairIterator it(id2guid); it; it++) {
for (MyHTable<Ident, guid_t, HashIdent>::PairIterator it(id2guid); it(); it++) {
if (!src.id2guid.hasKey((*it).fst))
return false;
if (src.id2guid[(*it).fst] != (*it).snd)
return false;
}
for (MyHTable<guid_t, Ident>::PairIterator it(guid2id); it; it++) {
for (MyHTable<guid_t, Ident>::PairIterator it(guid2id); it(); it++) {
if (!src.guid2id.hasKey((*it).fst))
return false;
......
......@@ -18,7 +18,7 @@
namespace otawa {
namespace poly {
using namespace otawa;
using namespace otawa::util;
//using namespace otawa::util;
using namespace elm;
using namespace otawa::ai;
......@@ -74,7 +74,7 @@ class PolyAnalysis : public Processor {
using state_t = PPLManager::t;
void processCFG(CFG & /* cfg */, state_t & /* s */, MyHTable<int,PPLDomain> &, bool /* isEntryCFG */, bool /* summarize */);
void processBB(PPLManager *man, ai::CFGGraph &graph, MyHTable<int,PPLDomain> &,
WorkListDriver<PPLManager, ai::CFGGraph, ai::EdgeStore<PPLManager, ai::CFGGraph>, PseudoTopoOrder> &ana,
OrderedDriver<PPLManager, ai::CFGGraph, ai::EdgeStore<PPLManager, ai::CFGGraph>, PseudoTopoOrder> &ana,
ai::EdgeStore<PPLManager, ai::CFGGraph> &store,
MyHTable<int, state_t> &headerState);
const PropList *_props{};
......
......@@ -16,7 +16,7 @@
namespace otawa {
namespace poly {
using namespace otawa;
using namespace otawa::util;
//using namespace otawa::util;
class PPLDomain;
extern Identifier<int> NUM_LOC_VARS;
......
......@@ -3,11 +3,7 @@
#include <otawa/dfa/FastState.h>
#include <otawa/dfa/ai.h>
#include <otawa/flowfact/features.h>
#include <otawa/graph/Graph.h>
#include <otawa/otawa.h>
#include <otawa/util/HalfAbsInt.h>
#include <otawa/util/WideningFixPoint.h>
#include <otawa/util/WideningListener.h>
#include <ppl.hh>
#include "include/PPLDomain.h"
......@@ -182,7 +178,7 @@ void PPLDomain::print(io::Output &out) const {
if (_summary != nullptr) {
cout << "Summary info: " << endl;
cout << "- Inputs: ";
for (MyHTable<Ident, guid_t, HashIdent>::PairIterator it = idmap.getPairIter(); it; it++) {
for (MyHTable<Ident, guid_t, HashIdent>::PairIterator it = idmap.getPairIter(); it(); it++) {
const Pair<Ident, guid_t> &p = *it;
if ((p.fst.getType() == Ident::ID_MEM_VAL_INPUT) || (p.fst.getType() == Ident::ID_REG_INPUT))
cout << p.fst << ", ";
......@@ -195,7 +191,7 @@ void PPLDomain::print(io::Output &out) const {
*/
cout << "- Outputs/Side-effects: ";
for (elm::genstruct::Vector<Ident>::Iterator it(_summary->_damaged); it; it++) {
for (elm::Vector<Ident>::Iter it(_summary->_damaged); it(); it++) {
cout << *it << ", ";
}
cout << endl;
......@@ -274,7 +270,7 @@ bool PPLDomain::equals(const PPLDomain &b) const {
PPLDomain l = *this;
int expectedVarCount = 0;
for (MyHTable<Ident, guid_t, HashIdent>::PairIterator it = idmap.getPairIter(); it; it++) {
for (MyHTable<Ident, guid_t, HashIdent>::PairIterator it = idmap.getPairIter(); it(); it++) {
const Pair<Ident, guid_t> &p = *it;
if ((p.fst.getType() == Ident::ID_MEM_VAL) || (p.fst.getType() == Ident::ID_MEM_ADDR) || (p.fst.getType() == Ident::ID_MEM_VAL_INPUT)) {
continue;
......@@ -365,7 +361,7 @@ void PPLDomain::displayLocVars(io::Output &out) const {
poly_copy.add_constraint(v == ssp - i - LOC_VAR_SIZE(_props));
out << " [SP - " << hex(i) << "] == ";
bool found = false;
for (MyHTable<Ident, guid_t, HashIdent>::PairIterator it = idmap.getPairIter(); it; it++) {
for (MyHTable<Ident, guid_t, HashIdent>::PairIterator it = idmap.getPairIter(); it(); it++) {
elm::Pair<Ident, guid_t> p = *it;
WVar vsnd = WVar(p.snd);
if (p.fst.getType() == Ident::ID_MEM_ADDR) {
......@@ -413,7 +409,7 @@ void PPLDomain::displayGlobVars(io::Output &out) const {
}
Ident id_ssp(Ident::ID_START_SP, Ident::ID_SPECIAL);
out << "Global variables: " << endl;
for (MyHTable<Ident, guid_t, HashIdent>::PairIterator it = idmap.getPairIter(); it; it++) {
for (MyHTable<Ident, guid_t, HashIdent>::PairIterator it = idmap.getPairIter(); it(); it++) {
elm::Pair<Ident, guid_t> p = *it;
if (p.fst.getType() == Ident::ID_MEM_ADDR) {
PPL::Coefficient num, den;
......@@ -502,7 +498,7 @@ bool PPLDomain::mustAlias(const WVar &v1, const WVar &v2, int offset) const {
void PPLDomain::displayIdentMap(io::Output &out) const {
out << "Mapping: ";
for (MyHTable<Ident, guid_t, HashIdent>::PairIterator it = idmap.getPairIter(); it; it++) {
for (MyHTable<Ident, guid_t, HashIdent>::PairIterator it = idmap.getPairIter(); it(); it++) {
const Ident &ident = (*it).fst;
WVar v = WVar((*it).snd);
out << ident << ":" << v << ", ";
......@@ -519,7 +515,7 @@ PPLDomain PPLDomain::getLinearExpr(const Ident &id) {
int axis = 1;
PPLDomain dom(*this); /* make a working copy to do the projections */
inputs[getVar(id).id()] = 0;
for (MyHTable<Ident, guid_t, HashIdent>::PairIterator it = idmap.getPairIter(); it; it++) {
for (MyHTable<Ident, guid_t, HashIdent>::PairIterator it = idmap.getPairIter(); it(); it++) {
if (((*it).fst.getType() == Ident::ID_REG_INPUT) ||
((*it).fst.getType() == Ident::ID_MEM_VAL_INPUT)) {
inputs[(*it).snd] = axis;
......@@ -553,7 +549,7 @@ PPLDomain PPLDomain::onLoopExitLinear(int loop, const PPLDomain &bound) const {
WVar v = s_out.getVar(id);
MyHTable<int,int> map;
Vector<int> mapped;
for (MyHTable<Ident, guid_t, HashIdent>::PairIterator it = idmap.getPairIter(); it; it++) {
for (MyHTable<Ident, guid_t, HashIdent>::PairIterator it = idmap.getPairIter(); it(); it++) {
if (((*it).fst.getType() == Ident::ID_REG_INPUT) || ((*it).fst.getType() == Ident::ID_MEM_VAL_INPUT) || ((*it).fst == id)) {
if (hasIdent((*it).fst)) {
const WVar &v2 = getVar((*it).fst);
......@@ -1390,9 +1386,9 @@ PPLDomain PPLDomain::onSemInst(const sem::inst &si, int /*instaddr*/) const {
*/
Ident idEquiv; /* Identifier equivalent to the store addr, if any. */
elm::genstruct::Vector<Ident> overlaps; /* List of identifiers overlapping the store addr. */
elm::Vector<Ident> overlaps; /* List of identifiers overlapping the store addr. */
for (MyHTable<Ident, guid_t, HashIdent>::PairIterator it = s_out.idmap.getPairIter(); it; it++) {
for (MyHTable<Ident, guid_t, HashIdent>::PairIterator it = s_out.idmap.getPairIter(); it(); it++) {
const Ident &idCurrent = (*it).fst;
if (idCurrent.getType() == Ident::ID_MEM_ADDR) {
const WVar &current = WVar((*it).snd);
......@@ -1421,7 +1417,7 @@ PPLDomain PPLDomain::onSemInst(const sem::inst &si, int /*instaddr*/) const {
}
/* Merge with overlapping abstract locations */
for (elm::genstruct::Vector<Ident>::Iterator it(overlaps); it; it++) {
for (elm::Vector<Ident>::Iter it(overlaps); it(); it++) {
const WVar &overlap = s_out.getVar((*it));
#ifdef POLY_DEBUG
cout << "STORE: Merging existing location " << (*it) << " with new value." << endl;
......@@ -1443,7 +1439,7 @@ PPLDomain PPLDomain::onSemInst(const sem::inst &si, int /*instaddr*/) const {
/*
* Looking for existing abstract location equivalent to load address.
*/
for (MyHTable<Ident, guid_t, HashIdent>::PairIterator it = s_out.idmap.getPairIter(); it; it++) {
for (MyHTable<Ident, guid_t, HashIdent>::PairIterator it = s_out.idmap.getPairIter(); it(); it++) {
if ((*it).fst.getType() == Ident::ID_MEM_ADDR) {
WVar current = WVar((*it).snd);
......@@ -1535,7 +1531,7 @@ template <class F> void PPLDomain::doMapIdents(F pfunc) {
#ifdef POLY_DEBUG
cout << "Remapping: ";
#endif
for (MyHTable<Ident, guid_t, HashIdent>::PairIterator it = idmap.getPairIter(); it; it++) {
for (MyHTable<Ident, guid_t, HashIdent>::PairIterator it = idmap.getPairIter(); it(); it++) {
guid_t old_guid = (*it).snd;
guid_t new_guid = (*it).snd;
if (pfunc.maps(old_guid, new_guid)) {
......@@ -1576,7 +1572,7 @@ void PPLDomain::doIntegerWrap() {
void PPLDomain::doKillTemporaries() {
Vector<Ident> toDel;
for (MyHTable<Ident, guid_t, HashIdent>::PairIterator it = idmap.getPairIter(); it; it++)
for (MyHTable<Ident, guid_t, HashIdent>::PairIterator it = idmap.getPairIter(); it(); it++)
if ((((*it).fst.getType() == Ident::ID_REG) && (*it).fst.getId() < 0)) {
toDel.add((*it).fst);
#ifdef POLY_DEBUG
......@@ -1584,7 +1580,7 @@ void PPLDomain::doKillTemporaries() {
#endif
}
for (Vector<Ident>::Iter it(toDel); it; it++) {
for (Vector<Ident>::Iter it(toDel); it(); it++) {
varKill(*it);
}
}
......@@ -1592,7 +1588,7 @@ void PPLDomain::doKillTemporaries() {
void PPLDomain::doKillRegisters(BitVector bv) {
Vector<Ident> toDel;
for (MyHTable<Ident, guid_t, HashIdent>::PairIterator it = idmap.getPairIter(); it; it++)
for (MyHTable<Ident, guid_t, HashIdent>::PairIterator it = idmap.getPairIter(); it(); it++)
if (((*it).fst.getType() == Ident::ID_REG) &&
(*it).fst.getId() >= 0 &&
(*it).fst.getId() < bv.size() &&
......@@ -1614,7 +1610,7 @@ void PPLDomain::doKillRegisters(BitVector bv) {
toDel.add((*it).fst);
}
for (Vector<Ident>::Iter it(toDel); it; it++) {
for (Vector<Ident>::Iter it(toDel); it(); it++) {
varKill(*it);
}
}
......@@ -1622,7 +1618,7 @@ void PPLDomain::doKillRegisters(BitVector bv) {
void PPLDomain::doLeaveFunction() {
Vector<Ident> toDel;
for (MyHTable<Ident, guid_t, HashIdent>::PairIterator it = idmap.getPairIter(); it; it++) {
for (MyHTable<Ident, guid_t, HashIdent>::PairIterator it = idmap.getPairIter(); it(); it++) {
elm::Pair<Ident, guid_t> p = *it;
WVar v = WVar((*it).snd);
......@@ -1641,7 +1637,7 @@ void PPLDomain::doLeaveFunction() {
}
}
for (Vector<Ident>::Iter it(toDel); it; it++)
for (Vector<Ident>::Iter it(toDel); it(); it++)
varKill(*it);
}
......@@ -1660,7 +1656,7 @@ void PPLDomain::doFinalizeUpdate() {
return;
}
#endif
for (Vector<guid_t>::Iter it(victims); it; it++) {
for (Vector<guid_t>::Iter it(victims); it(); it++) {
poly.unconstrain(WVar(*it));
}
......@@ -2160,7 +2156,7 @@ void PPLDomain::_doMatchGlobals(PPLDomain &l1, PPLDomain &r1,
MyHTable<guid_t, Vector<PPL::Coefficient> > &leftVMap,
MyHTable<Vector<PPL::Coefficient> , guid_t, VectCoefIdent> &invRightVMap) const {
// Look for unmatched global variables
for (MyHTable<guid_t, Vector<PPL::Coefficient> >::PairIterator it(leftVMap); it; it++) {
for (MyHTable<guid_t, Vector<PPL::Coefficient> >::PairIterator it(leftVMap); it(); it++) {
Vector<PPL::Coefficient> vect = (*it).snd;
int i;
for (i = 0; (i < vect.length() - 2) && (vect[i] == 0); i++);
......@@ -2261,11 +2257,11 @@ void PPLDomain::_doUnify(PPLDomain &l1, PPLDomain &r1, bool noPtr) const {
MyHTable<Vector<PPL::Coefficient> , guid_t, VectCoefIdent> invLeftVMap, invRightVMap;
for (MyHTable<guid_t, Vector<PPL::Coefficient> >::PairIterator it(leftVMap); it; it++) {
for (MyHTable<guid_t, Vector<PPL::Coefficient> >::PairIterator it(leftVMap); it(); it++) {
invLeftVMap.put((*it).snd, (*it).fst);
}
for (MyHTable<guid_t, Vector<PPL::Coefficient> >::PairIterator it(rightVMap); it; it++) {
for (MyHTable<guid_t, Vector<PPL::Coefficient> >::PairIterator it(rightVMap); it(); it++) {
invRightVMap.put((*it).snd, (*it).fst);
if (invLeftVMap.hasKey((*it).snd)) {
#ifdef POLY_DEBUG
......@@ -2288,8 +2284,8 @@ void PPLDomain::_doUnify(PPLDomain &l1, PPLDomain &r1, bool noPtr) const {
// take care of memory variables that were already same()
for (MyHTable<Ident, guid_t, HashIdent>::PairIterator it = l1.idmap.getPairIter(); it; it++) {
for (MyHTable<Ident, guid_t, HashIdent>::PairIterator it2 = r1.idmap.getPairIter(); it2; it2++) {
for (MyHTable<Ident, guid_t, HashIdent>::PairIterator it = l1.idmap.getPairIter(); it(); it++) {
for (MyHTable<Ident, guid_t, HashIdent>::PairIterator it2 = r1.idmap.getPairIter(); it2(); it2++) {
WVar x1((*it).snd);
WVar x2((*it2).snd);
if (((*it).fst.getType() == Ident::ID_MEM_ADDR) || ((*it).fst.getType() == Ident::ID_MEM_VAL)) {
......@@ -2302,7 +2298,7 @@ void PPLDomain::_doUnify(PPLDomain &l1, PPLDomain &r1, bool noPtr) const {
}
// rename register variables
for (MyHTable<Ident, guid_t, HashIdent>::PairIterator it = l1.idmap.getPairIter(); it; it++) {
for (MyHTable<Ident, guid_t, HashIdent>::PairIterator it = l1.idmap.getPairIter(); it(); it++) {
if (((*it).fst.getType() != Ident::ID_MEM_ADDR) && ((*it).fst.getType() != Ident::ID_MEM_VAL))
if (r1.idmap.has1((*it).fst)) {
rename.add((*it).snd, r1.idmap.find1((*it).fst));
......
......@@ -4,11 +4,7 @@
#include <otawa/dfa/ai.h>
#include <otawa/dfa/State.h>
#include <otawa/flowfact/features.h>
#include <otawa/graph/Graph.h>
#include <otawa/otawa.h>
#include <otawa/util/HalfAbsInt.h>
#include <otawa/util/WideningFixPoint.h>
#include <otawa/util/WideningListener.h>
#include <ppl.hh>
#include "include/PPLDomain.h"
......@@ -18,7 +14,6 @@
namespace otawa {
namespace poly {
using namespace otawa;
using namespace util;
/**
* Create PPLManager using a fresh init state.
......
......@@ -3,12 +3,12 @@
#include <otawa/dfa/FastState.h>
#include <otawa/dfa/ai.h>
#include <otawa/flowfact/features.h>
#include <otawa/graph/Graph.h>
//#include <otawa/graph/Graph.h>
#include <otawa/otawa.h>
#include <otawa/util/HalfAbsInt.h>
#include <otawa/util/WideningFixPoint.h>
//#include <otawa/util/HalfAbsInt.h>
//#include <otawa/util/WideningFixPoint.h>
#include <otawa/hard/Memory.h>
#include <otawa/util/WideningListener.h>
//#include <otawa/util/WideningListener.h>
#include <otawa/oslice/features.h>
#include <otawa/ai/WorkListDriver.h>
#include <ppl.hh>
......@@ -19,7 +19,7 @@
namespace otawa {
namespace poly {
using namespace otawa;
using namespace util;
//using namespace util;
p::declare PolyAnalysis::reg = p::init("otawa::poly::PolyAnalysis", Version(1, 0, 0))
.require(COLLECTED_CFG_FEATURE)
......@@ -42,7 +42,7 @@ PolyAnalysis::state_t PolyAnalysis::processHeader(ai::CFGGraph &graph, MyHTable<
state_t entryState = man.bot();
state_t backState = man.bot();
for (ai::CFGGraph::Predecessor e(graph, header); e; e++) {
for (ai::CFGGraph::Predecessor e(graph, header); e(); e++) {
state_t edgeState = store.get(*e);
if (Dominance::dominates(e->sink(), e->source())) {
......@@ -116,7 +116,7 @@ PolyAnalysis::state_t PolyAnalysis::processHeader(ai::CFGGraph &graph, MyHTable<
}
void PolyAnalysis::processBB(PPLManager *man, ai::CFGGraph &graph, MyHTable<int,PPLDomain> &lb,
WorkListDriver<PPLManager, ai::CFGGraph, ai::EdgeStore<PPLManager, ai::CFGGraph>, PseudoTopoOrder> &ana,
OrderedDriver<PPLManager, ai::CFGGraph, ai::EdgeStore<PPLManager, ai::CFGGraph>, PseudoTopoOrder> &ana,
ai::EdgeStore<PPLManager, ai::CFGGraph>& store,
MyHTable<int, state_t> &headerState) {
/*
......@@ -193,7 +193,7 @@ void PolyAnalysis::processBB(PPLManager *man, ai::CFGGraph &graph, MyHTable<int,
} else {
compose_ok = true;
MyHTable<int, PPLDomain> *sublb = MAX_LINEAR(subCFG);
for (MyHTable<int, PPLDomain>::PairIterator it(*sublb); it; it++) {
for (MyHTable<int, PPLDomain>::PairIterator it(*sublb); it(); it++) {
PPLDomain composed((*it).snd);
cout << "linear bounds: " << composed << endl;
cout << "caller state: " << s << endl;
......@@ -230,7 +230,7 @@ void PolyAnalysis::processBB(PPLManager *man, ai::CFGGraph &graph, MyHTable<int,
}
}
for (ai::CFGGraph::Successor e(graph, *ana); e; e++) {
for (ai::CFGGraph::Successor e(graph, *ana); e(); e++) {
ana.check(*e, s);
}
} else {
......@@ -241,17 +241,17 @@ void PolyAnalysis::processBB(PPLManager *man, ai::CFGGraph &graph, MyHTable<int,
#endif
/* Basic block processing */
for (BasicBlock::InstIter inst(bl); inst; inst++) {
for (BasicBlock::InstIter inst(bl); inst(); inst++) {
#ifdef POLY_DEBUG
cout << "Starting update for CPU (concrete) instruction: " << *inst << endl;
#endif
sem::Block block;
inst->semInsts(block);
for (sem::Block::InstIter semi(block); semi; semi++) {
for (sem::Block::InstIter semi(block); semi(); semi++) {
#ifdef POLY_DEBUG
cout << "Updating for semantic instruction (IR): " << *semi << endl;
#endif
s = s.onSemInst(*semi, inst->address());
s = s.onSemInst(*semi, inst->address().offset());
#ifdef POLY_DEBUG
cout << "State after semantic instruction update: " << endl << s << endl << endl;
#endif
......@@ -277,10 +277,10 @@ void PolyAnalysis::processBB(PPLManager *man, ai::CFGGraph &graph, MyHTable<int,
for (int doExit = 0; doExit < 2; doExit++) {
/* Do loop exit edges last (improves performance) */
for (ai::CFGGraph::Successor e(graph, *ana); e; e++) {
if ((LOOP_EXIT_EDGE(e) == nullptr) && !doExit)
for (ai::CFGGraph::Successor e(graph, *ana); e(); e++) {
if ((LOOP_EXIT_EDGE(e->sink()) == nullptr) && !doExit)
continue;
if ((LOOP_EXIT_EDGE(e) != nullptr) && doExit)
if ((LOOP_EXIT_EDGE(e->sink()) != nullptr) && doExit)
continue;
#ifdef POLY_DEBUG
cout << "OutEdge: " << *e << ", taken= " << (e->isTaken()) << endl;
......@@ -293,7 +293,7 @@ void PolyAnalysis::processBB(PPLManager *man, ai::CFGGraph &graph, MyHTable<int,
* 2. The current output edge of current block is an exit-edge (need to do onLoopExit)
* 3. The current block has a conditional branch (need to do onBranch, for filtering)
*/
if (!LOOP_HEADER(e->sink()) && (LOOP_EXIT_EDGE(e) == nullptr) && !s.hasFilter()) {
if (!LOOP_HEADER(e->sink()) && (LOOP_EXIT_EDGE(e->sink()) == nullptr) && !s.hasFilter()) {
/* no edge update: simply copy output state to successor input state */
ana.check(*e, s);
} else {
......@@ -329,9 +329,9 @@ void PolyAnalysis::processBB(PPLManager *man, ai::CFGGraph &graph, MyHTable<int,
}
}
if (LOOP_EXIT_EDGE(e) != nullptr) {
if (LOOP_EXIT_EDGE(e->sink()) != nullptr) {
/* Exit edge: remove virtual loop counter, and apply loop bound constraint on state */
Block *bb = LOOP_EXIT_EDGE(e);
Block *bb = LOOP_EXIT_EDGE(e->sink());
/*
* FIXME: should be bound = s.getLoopBound(bb->id()) but we need to fix the widening to make it work
......@@ -412,8 +412,8 @@ void PolyAnalysis::PseudoTopoOrder::_topoNodeHelper(const ai::CFGGraph &graph, B
if (_visited->bit(end->index()))
return;
for (ai::CFGGraph::Predecessor e(graph, end); e; e++) {
if (!BACK_EDGE(e))
for (ai::CFGGraph::Predecessor e(graph, end); e(); e++) {
if (!BACK_EDGE(e->source()))
_topoNodeHelper(graph, e->source());
}
......@@ -437,7 +437,7 @@ void PolyAnalysis::PseudoTopoOrder::_getPseudoTopo(const ai::CFGGraph &graph) {
for (ai::CFGGraph::Iterator it(graph); !it.ended(); it++) {
bool hasNonBackEdges = false;
for (ai::CFGGraph::Successor e(graph, (*it)); !e.ended() && !hasNonBackEdges; e++) {
if (!BACK_EDGE(e))
if (!BACK_EDGE(e->sink()))
hasNonBackEdges = true;
}
if (!hasNonBackEdges)
......@@ -461,9 +461,9 @@ void PolyAnalysis::processCFG(CFG &cfg, state_t &s, MyHTable<int, PPLDomain> &lb
cout << "Init state: " << s << endl;
#endif
cout << "Entering CFG: " << cfg.name() << endl;
WorkListDriver<PPLManager, ai::CFGGraph, ai::EdgeStore<PPLManager, ai::CFGGraph>, PseudoTopoOrder> ana(*man, graph, store, _orders[cfg.index()]);
OrderedDriver<PPLManager, ai::CFGGraph, ai::EdgeStore<PPLManager, ai::CFGGraph>, PseudoTopoOrder> ana(*man, graph, store, _orders[cfg.index()]);
while (ana) {
while (ana()) {
processBB(man, graph, lb, ana, store, headerState);
ana++;
}
......@@ -472,7 +472,7 @@ void PolyAnalysis::processCFG(CFG &cfg, state_t &s, MyHTable<int, PPLDomain> &lb
Block *bb = graph.exit();
Block::EdgeIter edge(bb->ins());
s = store.get(edge);
s = store.get(*edge);
#ifdef POLY_DEBUG
cout << "FINAL STATE: " << endl;
......@@ -499,7 +499,7 @@ void PolyAnalysis::processWorkSpace(WorkSpace *ws) {
ASSERT(coll);
_orders.setLength(coll->count());
for (CFGCollection::Iter iter2(coll); iter2; iter2++) {
for (CFGCollection::Iter iter2(coll); iter2(); iter2++) {
cout << "Preparing CFG: " << (*iter2)->name() << endl;
ai::CFGGraph graph((*iter2));
PseudoTopoOrder *pto = new PseudoTopoOrder(graph);
......@@ -533,8 +533,8 @@ void PolyAnalysis::processWorkSpace(WorkSpace *ws) {
cout << endl;
cout << "LOOP BOUNDS: " << endl;
for (CFGCollection::Iter iter2(coll); iter2; iter2++) {
for (CFG::BlockIter iter((*iter2)->blocks()); iter; iter++) {
for (CFGCollection::Iter iter2(coll); iter2(); iter2++) {
for (CFG::BlockIter iter((*iter2)->blocks()); iter(); iter++) {
Block *bb = (*iter);
if (LOOP_HEADER(bb)) {
if (static_bounds.hasKey(bb->id())) {
......@@ -552,8 +552,8 @@ void PolyAnalysis::processWorkSpace(WorkSpace *ws) {
}
#else
cout << "LOOP BOUNDS: " << endl;
for (CFGCollection::Iter iter2(coll); iter2; iter2++) {
for (CFG::BlockIter iter((*iter2)->blocks()); iter; iter++) {
for (CFGCollection::Iter iter2(coll); iter2(); iter2++) {
for (CFG::BlockIter iter((*iter2)->blocks()); iter(); iter++) {
Block *bb = (*iter);
if (LOOP_HEADER(bb)) {
cout << "[" << (*iter2)->name() << "]"
......
......@@ -3,7 +3,6 @@
#include <otawa/app/Application.h>
#include <otawa/script/Script.h>
#include <otawa/ipet/IPET.h>
#include <otawa/util/FlowFactLoader.h>
#include <otawa/ilp/System.h>
#include <otawa/stats/StatInfo.h>
#include <otawa/cfg/features.h>
......
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