Commit c79e9ce5 authored by Maeva Ramarjiaona's avatar Maeva Ramarjiaona

Fixing compilation errors

parent db8ee8f1
#ifndef LRUSECURITY_ACSSECURITY_H_
#define LRUSECURITY_ACSSECURITY_H_
#ifndef LRUSECURITY_ACSSECURITY_H_H_
#define LRUSECURITY_ACSSECURITY_H_H_
#include <otawa/icache/features.h>
#include <otawa/icat3/features.h>
......@@ -17,4 +17,4 @@ class ACSSecurity
otawa::Bag<otawa::icache::Access> _prev;
};
}
#endif //LRUSECURITY_ACSSECURITY_H
#endif //LRUSECURITY_ACSSECURITY_H_H
......@@ -12,8 +12,8 @@ namespace lrusecurity {
// Exist-Hit with previous access
extern otawa::p::feature EXIST_HIT_PREV_ANALYSIS_FEATURE;
extern otawa::p::id<otawa::icat3::Container<ACSSecurity> > EXIST_HIT_PREV_INIT;
extern otawa::p::id<otawa::icat3::Container<ACSSecurity> > EXIST_HIT_PREV_IN;
extern otawa::p::id<otawa::icat3::Container<lrusecurity::ACSSecurity> > EXIST_HIT_PREV_INIT;
extern otawa::p::id<otawa::icat3::Container<lrusecurity::ACSSecurity> > EXIST_HIT_PREV_IN;
enum class SecurityCategory{
SAFE,
......
......@@ -4,7 +4,7 @@
#include <otawa/proc/Processor.h>
#include <otawa/icat3/features.h>
#include <otawa/cfg/features.h>
#include "ACSSecurity.h"
#include <lrusecurity/ACSSecurity.h>
namespace lrusecurity
{
......@@ -12,7 +12,7 @@ class ExistHitPrevAnalysis: public otawa::Processor
{
public:
static otawa::p::declare reg;
ExistHitAnalysis(otawa::p::declare& r = reg);
ExistHitPrevAnalysis(otawa::p::declare& r = reg);
protected:
......@@ -56,7 +56,7 @@ extern otawa::p::feature EXIST_HIT_PREV_ANALYSIS_FEATURE;
*
* @ingroup lrusecurity
*/
extern otawa::p::id<otawa::icat3::Container<ACSSecurity> > EXIST_HIT_PREV_IN;
extern otawa::p::id<otawa::icat3::Container<lrusecurity::ACSSecurity> > EXIST_HIT_PREV_IN;
/**
......@@ -70,7 +70,7 @@ extern otawa::p::id<otawa::icat3::Container<ACSSecurity> > EXIST_HIT_PREV_IN;
*
* @ingroup lrusecurity
*/
extern otawa::p::id<otawa::icat3::Container<ACSSecurity> > EXIST_HIT_PREV_INIT;
extern otawa::p::id<otawa::icat3::Container<lrusecurity::ACSSecurity> > EXIST_HIT_PREV_INIT;
}; // namespace lrusecurity
......
......@@ -6,7 +6,7 @@
#include <elm/io/Output.h>
#include <lrupreanalysis/features.h>
#include "ACSSecurity.h"
#include <lrusecurity/ACSSecurity.h>
namespace lrusecurity
{
......
......@@ -4,7 +4,6 @@
#include <otawa/proc/BBProcessor.h>
#include <otawa/icat3/features.h>
#include <otawa/hard/Memory.h>
#include <otawa/cfg/Loop.h>
#include <lrumc/ACSManager.h>
#include <lrusecurity/features.h>
#include <lrupreanalysis/features.h>
......@@ -28,14 +27,14 @@ protected:
const otawa::icat3::LBlockCollection* coll = icat3::LBLOCKS(ws);
ASSERT(coll);
_ways = coll->A();
_man = new ACSManager(ws);
_man = new lrumc::ACSManager(ws);
}
virtual void cleanup(WorkSpace*) {
delete _man;
}
virtual void processBB(WorkSpace*, CFG*, Block *v)
virtual void processBB(WorkSpace*, CFG* cfg, Block *v)
{
for(Block::EdgeIter e = v->outs(); e; e++) {
if(logFor(LOG_BLOCK))
......@@ -44,22 +43,19 @@ protected:
_man->start(v->toSynth()->callee()->exit());
else
_man->start(v);
processAccesses(*icache::ACCESSES(v), v);
processAccesses(*icache::ACCESSES(e), e);
//otawa::sgraph::LoopIdentifier loopv = otawa::sgraph::LoopIdentifier::loopOf(v);
///otawa::sgraph::LoopIdentifier loope = otawa::sgraph::LoopIdentifier::loopOf(e.sink());
processAccesses(*icache::ACCESSES(v));
processAccesses(*icache::ACCESSES(e));
}
}
void processAccesses(Bag<icache::Access>& accs, Block *v) {
void processAccesses(Bag<icache::Access>& accs) {
for(int i = 0; i < accs.count(); i++) {
lrusecurity::SecurityCategory cat;
if (lrupreanalysis::ExactCategory(accs[i]) ==
lrupreanalysis::ExactCategory::DU) {
if (Loop::of(v) != Loop::top(v.cfg())) {
if (lrupreanalysis::EXACT_CATEGORY(accs[i]) ==
lrupreanalysis::ExactCategory::DU)
cat = SecurityCategory::UNSAFE;
}
else
cat = SecurityCategory::SAFE;
}
else
cat = SecurityCategory::SAFE;
......@@ -82,7 +78,7 @@ protected:
}
int _ways;
ACSManager* _man;
lrumc::ACSManager* _man;
};
p::declare SecurityCatBuilder::reg = p::init("lrusecurity::SecurityCatBuilder", Version(1, 0, 0))
......
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