Skip to content
Snippets Groups Projects
Commit b8a1cbff authored by Ballabriga Clément's avatar Ballabriga Clément
Browse files

modif author

parent 77f34c86
Branches
No related tags found
No related merge requests found
Clement Ballabriga <Clement.Ballabriga@univ-lille1.fr>
Clement Ballabriga <Clement.Ballabriga@univ-lille.fr>
Julien Forget <Julien.Forget@univ-lille.fr>
Jordy Ruiz <jordyruiz@gmail.com>
CXXFLAGS=`otawa-config otawa/oslice --cflags`
LIBS=`otawa-config otawa/oslice --libs`
CXXFLAGS=`otawa/bin/otawa-config otawa/oslice --cflags`
LIBS=`otawa/bin/otawa-config otawa/oslice --libs`
LIBS+=-lppl
CXXFLAGS+=-fPIC -Wall -DUSE_CLANG_COMPLETER -std=c++14 -O0 -g
CC=gcc
CXX=g++
CXXFLAGS+=-fPIC -Wall -DUSE_CLANG_COMPLETER -std=c++14 -O3 -march=native
#CXXFLAGS+=-fPIC -Wall -DUSE_CLANG_COMPLETER -std=c++14 -O0 -g
all: poly.so
dbg: CXXFLAGS += -DELM_LOG
dbg: poly.so
debug: CXXFLAGS += -DPOLY_DEBUG
debug: poly.so
poly.so: poly_PolyAnalysis.o poly_PlugHook.o poly_PPLDomain.o poly_PPLManager.o poly_PolyWrap.o
$(CC) -shared -o poly.so poly_PolyAnalysis.o poly_PlugHook.o poly_PPLDomain.o poly_PPLManager.o poly_PolyWrap.o $(LIBS)
......@@ -36,6 +47,9 @@ install: poly.so
cp poly.eld $(HOME)/.otawa/proc/otawa/
cp poly.so $(HOME)/.otawa/proc/otawa/
tabtest: install
make -C tests tabtest
test: douter
tests: douter
......
This diff is collapsed.
......@@ -4,7 +4,11 @@
#include <otawa/dfa/ai.h>
#include <otawa/dfa/State.h>
#include <otawa/flowfact/features.h>
#include <otawa/graph/Graph.h>
#include <otawa/otawa.h>
#include <otawa/util/HalfAbsInt.h>
#include <otawa/util/WideningFixPoint.h>
#include <otawa/util/WideningListener.h>
#include <ppl.hh>
#include "include/PPLDomain.h"
......@@ -14,6 +18,7 @@
namespace otawa {
namespace poly {
using namespace otawa;
using namespace util;
/**
* Create PPLManager using a fresh init state.
......@@ -21,12 +26,12 @@ using namespace otawa;
PPLManager::PPLManager(const PropList &props, WorkSpace *ws)
: _init(MAX_AXIS(props), ws), _bot(), _top(MAX_AXIS(props), ws) {
WVar var_sp = _init.varNew(Ident(13, Ident::ID_REG));
WVar var_fp = _init.varNew(Ident(11, Ident::ID_REG));
WVar var_lr = _init.varNew(Ident(14, Ident::ID_REG));
WVar var_ssp = _init.varNew(Ident(Ident::ID_START_SP, Ident::ID_SPECIAL));
WVar var_sfp = _init.varNew(Ident(Ident::ID_START_FP, Ident::ID_SPECIAL));
WVar var_slr = _init.varNew(Ident(Ident::ID_START_LR, Ident::ID_SPECIAL));
WVar var_sp = _init.varNew(Ident(13, Ident::ID_REG), NO_STEP, false, false);
WVar var_fp = _init.varNew(Ident(11, Ident::ID_REG), NO_STEP, false, false);
WVar var_lr = _init.varNew(Ident(14, Ident::ID_REG), NO_STEP, false, false);
WVar var_ssp = _init.varNew(Ident(Ident::ID_START_SP, Ident::ID_SPECIAL), NO_STEP, false, false);
WVar var_sfp = _init.varNew(Ident(Ident::ID_START_FP, Ident::ID_SPECIAL), NO_STEP, false, false);
WVar var_slr = _init.varNew(Ident(Ident::ID_START_LR, Ident::ID_SPECIAL), NO_STEP, false, false);
_init.doNewConstraint(var_ssp == var_sp);
_init.doNewConstraint(var_sfp == var_fp);
......
This diff is collapsed.
......@@ -39,14 +39,17 @@ void WLinExpr::print(output_t &out) const {
for (std::map<guid_t,coef_t>::const_iterator it=coefs.begin(); it!=coefs.end(); ++it) {
if (!first && (it->second >= 0)) {
out << "+ ";
} else if (it->second < 0) out << "- ";
} else if (it->second < 0) out << "− ";
if(it->second == 1 || it->second == -1)
out << "v" << it->first << " ";
else
out << (it->second > 0 ? it->second : -it->second) << ".v" << it->first << " ";
first = false;
}
if (cst != 0) {
if (cst >= 0) {
out << "+ ";
} else out << "- ";
} else out << " ";
out << (cst > 0 ? cst : -cst);
}
}
......@@ -68,12 +71,12 @@ void WPoly::print(output_t &out) const {
} else {
snprintf(name, sizeof(name), "%c", letter);
}
out << "v" << it->first << " -> " << name << "; ";
out << "v" << it->first << " -> " << name << " ";
}
out << "] " << endl << endl;
out << "WPoly: ";
out << "WPoly: [";
for (WPoly::ConsIterator it(*this); it; it++) {
out << (*it) << "; ";
out << (*it) << " ";
}
out << "]" << endl;
out << endl;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment