Commit ec328cf2 authored by Julien Balette-Pape's avatar Julien Balette-Pape

Now setup Collection with override of ProcessWorkSpace

parent 16fbff77
......@@ -22,10 +22,10 @@ void AccMatcher::setupCFG(CFG *cfg)
}
}
void AccMatcher::setupColl(CFGCollection *collection)
void AccMatcher::setupColl(const CFGCollection *collection)
{
for(int i = 0; i < collection->count(); i++) {
AccMatcher::setupCFG(*collection[i]);
for(auto cfg: *collection) {
AccMatcher::setupCFG(cfg);
}
}
......
......@@ -15,7 +15,7 @@ class AccMatcher
/* Cette classe permet de créer un dictionnaire entre Access et BasicBlock auquel appartient cet accès*/
public:
AccMatcher(void){};
void setupColl(otawa::CFGCollection *coll);
void setupColl(const otawa::CFGCollection *coll);
void setupCFG(otawa::CFG *cfg);
inline void insert(const otawa::icache::Access *acc, otawa::BasicBlock *bb){_match.insert({acc, bb});};
......
......@@ -4,6 +4,7 @@
#include <elm/sys/System.h>
#include <otawa/proc/BBProcessor.h>
#include <otawa/proc/CFGProcessor.h>
#include <otawa/prog/Process.h>
#include <lruexact/features.h>
#include <set>
......@@ -77,11 +78,17 @@ protected:
}
virtual void processCFG(WorkSpace* ws, CFG* cfg) override
{
virtual void processWorkSpace(WorkSpace *ws) override
{
const CFGCollection *coll = INVOLVED_CFGS(ws);
AccMatcher *match = getModificator() -> getMatcher();
match->setupCFG(cfg);
match->setupColl(coll);
CFGProcessor::processWorkSpace(ws);
}
virtual void processCFG(WorkSpace* ws, CFG* cfg) override
{
_out << "FUNCTION " << cfg->label() << io::endl;
BBProcessor::processCFG(ws, cfg);
}
......
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