Commit dc25fecb authored by Maeva Ramarjiaona's avatar Maeva Ramarjiaona

ACSSecurity is like ACS. Only one previous address is associated with each...

ACSSecurity is like ACS. Only one previous address is associated with each block. Bug, in some cases, the set of previous addresses returned is null.
parent 1a8ac300
......@@ -12,7 +12,11 @@ namespace lrusecurity
ACSSecurity(int n) : elm::AllocArray<otawa::Address>(n){
for (int i = 0; i < n; i++)
(*this)[i] = otawa::Address();
};
}
ACSSecurity(int n, const otawa::Address& adr) : elm::AllocArray<otawa::Address>(n, adr){
for (int i = 0; i < n; i++)
(*this)[i] = adr;
}
void print(int set, const otawa::icat3::LBlockCollection& coll, elm::io::Output& out= elm::cout) const;
};
}// namespace lrusecurity
......
......@@ -11,7 +11,7 @@ ExistHitPrevDomain::ExistHitPrevDomain(
const t *init) :
_n(coll[set].count()),
_bot(_n),
_top(_n),
_top(_n, Address(0)),
_set(set),
_coll(coll),
_A(coll.A()),
......@@ -30,7 +30,7 @@ bool ExistHitPrevDomain::equals(const t& acss, const t& bcss) const
void ExistHitPrevDomain::join(t& dcss, const t& scss)
{
for (int i = 0; i < _n; i++)
if(dcss[i].offset() <= scss[i].offset())
dcss[i] = scss[i];
}
......
......@@ -106,8 +106,8 @@ protected:
int set = otawa::icat3::LBLOCK(access)->set();
if (bb->hasProp(EXIST_HIT_PREV_IN)) {
ACSSecurity prev = (*EXIST_HIT_PREV_IN(bb))[set];
for (int i = 0; i < prev.size(); ++i)
_out << prev[i];
int index = otawa::icat3::LBLOCK(access)->index();
_out << prev[index];
}
......
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