Vous avez reçu un message "Your GitLab account has been locked ..." ? Pas d'inquiétude : lisez cet article https://docs.gricad-pages.univ-grenoble-alpes.fr/help/unlock/

ExistHitPrevDomain.h 1.38 KB
Newer Older
1
2
3
4
5
6
7
8
#ifndef LRUSECURITY_EXIST_HIT_DOMAIN_H_
#define LRUSECURITY_EXIST_HIT_DOMAIN_H_

#include <otawa/icat3/features.h>
#include <otawa/icache/features.h>
#include <elm/io/Output.h>

#include <lrupreanalysis/features.h>
Maeva Ramarjiaona's avatar
Maeva Ramarjiaona committed
9
#include <lrusecurity/ACSSecurity.h>
10
11
12
namespace lrusecurity
{

13
class ExistHitPrevDomain {
14
public:
15
  using t = ACSSecurity;
16

17
	ExistHitPrevDomain(const otawa::icat3::LBlockCollection& coll, int set, const t* init);
18
19
20
	inline const t& bot(void) const { return _bot; }
	inline const t& top(void) const { return _top; }
	inline const t& init(void) const { return _init; }
21
22
23
	inline void print(const t& a, otawa::io::Output& out) const { a._acs.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._acs[i] != otawa::icat3::BOT_AGE); }
24
25
26
	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);
27
	void fetch(t& a, const otawa::icache::Access ac, lrupreanalysis::ACSManager& mustManager);
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
	void update(const otawa::icache::Access& access, t& a, lrupreanalysis::ACSManager& mustManager);

private:
	int _n;
	t _bot, _top;
	otawa::hard::Cache::set_t _set;
	const otawa::icat3::LBlockCollection& _coll;
	int _A;
	const t& _init;
	t _tmp;
};

} // namespace lrusecurity

#endif // LRUSECURITY_EXIST_HIT_DOMAIN_H_