Commit 34bfbcb7 authored by Mishigan's avatar Mishigan Committed by Julien Balette-Pape

debug

parent a0b28ba3
......@@ -21,7 +21,7 @@ public:
inline const t& init(void) const { return _init; }
inline void print(const t& a, otawa::io::Output& out) const { a.print(_set, _coll, out); }
inline elm::io::Printable<t, ExistHitPrevDomain> print(const t& a) const { return elm::io::p(a, *this); }
inline bool contains(const t& a, int i) { return(a[i] !=otawa::Bag< otawa::Address>()); }
inline bool contains(const t& a, int i) { return(a[i].empty()); }
inline void copy(t& d, const t& s) { d.copy(s); }
bool equals(const t& a, const t& b) const;
void join(t& d, const t& s);
......
......@@ -29,19 +29,11 @@ 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++){
int newsize = dcss[i].size()+scss[i].size();
Bag<Address> newbag = Bag<Address>(newsize);
for (int j = 0; j < newsize; j++) {
if (j < dcss[i].size())
newbag[j]=dcss[i][j];
else
newbag[j]=scss[i][j - dcss[i].size()];
}
dcss[i] = Bag<Address>(newbag);
for (int i = 0; i < _n; i++){
dcss[i].insert(scss[i].begin(), scss[i].end());
}
}
void ExistHitPrevDomain::fetch(t& acss, const icache::Access& access, lrumc::ACSManager& ehManager)
{
......@@ -49,10 +41,11 @@ bool ExistHitPrevDomain::equals(const t& acss, const t& bcss) const
int b = lb->index();
for (int i = 0; i < _n; i++){
if (i == b){
Address smol[] = {access.address()};
acss[i] = Bag<Address>(1,smol);}
else if (ehManager.existHitAge(lb) == _A)
acss[i] = Bag<Address>();
Address smol[] = {access.address()};
acss[i] = std::set<otawa::Address *, Ptr_addr_comparator>();
acss[i].insert(smol);
} else if (mayManager.mayAge(_coll[_set][i]) == _A)
acss[i] = std::set<otawa::Address *, Ptr_addr_comparator>();
}
}
......
......@@ -21,7 +21,7 @@ public:
inline const t& init(void) const { return _init; }
inline void print(const t& a, otawa::io::Output& out) const { a.print(_set, _coll, out); }
inline elm::io::Printable<t, ExistHitPrevODomain> print(const t& a) const { return elm::io::p(a, *this); }
inline bool contains(const t& a, int i) { return(a[i] !=otawa::Bag< otawa::Address>()); }
inline bool contains(const t& a, int i) { return(!a[i].empty()); }
inline void copy(t& d, const t& s) { d.copy(s); }
bool equals(const t& a, const t& b) const;
void join(t& d, const t& s);
......
......@@ -23,7 +23,7 @@ public:
inline void print(const t& a, otawa::io::Output& out) const { a.print(_set, _coll, out); }
inline elm::io::Printable<t, ExistHitPrevUDomain> print(const t& a) const { return elm::io::p(a, *this); }
inline bool contains(const t& a, int i) { return(a[i] !=otawa::Bag< otawa::Address>()); }
inline bool contains(const t& a, int i) { return(!a[i].empty()); }
inline void copy(t& d, const t& s) { d.copy(s); }
bool equals(const t& a, const t& b) const;
void join(t& d, const t& s, otawa::icat3::ACS d_eh, otawa::icat3::ACS s_eh);
......
......@@ -34,15 +34,7 @@ void ExistHitPrevUDomain::join(t& dcss, const t& scss, icat3::ACS d_eh, icat3::A
if (s_eh[i] < d_eh[i] || (d_eh[i] == -1 && s_eh[i] != -1)) {
dcss[i] = scss[i];
} else if (s_eh[i] == d_eh[i]) {
int fullsize = (dcss[i]).size() + (scss[i]).size();
Bag <Address> tmp = Bag <Address> (fullsize);
for (int j = 0; j < fullsize; j++) {
if (j < (dcss[i]).size())
tmp[j] = dcss[i][j];
else
tmp[j] = scss[i][j - dcss[i].size()];
}
dcss[i] = tmp;
dcss[i].insert(scss[i].begin(), scss[i].end());
}
}
}
......@@ -54,9 +46,10 @@ void ExistHitPrevUDomain::fetch(t& acss, const icache::Access& access, lrupreana
for (int i = 0; i < _n; i++){
if (i == b){
Address smol[] = {access.address()};
acss[i] = Bag<Address>(1, smol);
acss[i] = std::set<otawa::Address *, Ptr_addr_comparator>();
acss[i].insert(smol);
} else if (ehManager.existHitAge(_coll[_set][i]) == _A)
acss[i] = Bag<Address>();
acss[i] = std::set<otawa::Address *, Ptr_addr_comparator>();
}
}
......
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