Otawa
0.10
|
#include <otawa/data/clp/SymbolicExpr.h>
Public Member Functions | |
FilterBuilder (BasicBlock *_bb, clp::ClpProblem &problem) | |
Build a filter and install them on the current BB. More... | |
Private Member Functions | |
void | getFilters (void) |
Find filters that apply on the basic block Two properties are sets: REG_FILTERS for filters on registers ADDR_FILTERS for filters on memory addresses. More... | |
void | iterateBranchPaths (Inst *inst, const Vector< Inst * > &insts) |
Iterate on all semantics execution paths and call makeFilters(). More... | |
sem::cond_t | reverseCond (sem::cond_t cond) |
Build the reverse of a condition. More... | |
SECmp * | makeFilters (SECmp *se, Inst *cur_inst, sem::Block &block) |
Accumulate in the reg_filters and addr_filters filters for the given block. More... | |
void | addFilters (SECmp *se, const Vector< Inst * > &insts) |
Add the filters for the current instruction list (taken backward). More... | |
Private Attributes | |
BasicBlock * | bb |
Vector< SECmp * > | reg_filters |
Vector< SECmp * > | addr_filters |
Vector< V > | known_reg |
Vector< V > | known_addr |
clp::ClpStatePack | pack |
otawa::se::FilterBuilder::FilterBuilder | ( | BasicBlock * | _bb, |
clp::ClpProblem & | problem | ||
) |
Build a filter and install them on the current BB.
_bb | BB to work on. |
References getFilters().
Add the filters for the current instruction list (taken backward).
se | Current conditional branch comparison. |
insts | Instructions of the block. |
References _, cerr, elm::genstruct::Vector< T >::clear(), elm::genstruct::Vector< T >::count(), makeFilters(), out, and TRACEGF.
Referenced by getFilters(), and iterateBranchPaths().
|
private |
Find filters that apply on the basic block Two properties are sets: REG_FILTERS for filters on registers ADDR_FILTERS for filters on memory addresses.
References elm::genstruct::Vector< T >::add(), addFilters(), otawa::se::ADDR_FILTERS, addr_filters, bb, otawa::sem::branch(), iterateBranchPaths(), otawa::se::REG_FILTERS, and reg_filters.
Referenced by FilterBuilder().
|
private |
Iterate on all semantics execution paths and call makeFilters().
bb | Current basic block. |
References addFilters(), addr_filters, otawa::sem::BRANCH, otawa::sem::CONT, elm::genstruct::Vector< T >::count(), otawa::sem::IF, elm::genstruct::Vector< T >::length(), makeFilters(), otawa::se::OR, elm::genstruct::Vector< T >::pop(), elm::genstruct::Vector< T >::push(), reg_filters, reverseCond(), otawa::Inst::semInsts(), and elm::genstruct::Vector< T >::setLength().
Referenced by getFilters().
|
private |
Accumulate in the reg_filters and addr_filters filters for the given block.
se | Current comparison. |
cur_inst | Current instruction. |
b | Block to work on. |
References _, otawa::sem::inst::a, otawa::se::SymbExpr::a(), otawa::sem::ADD, otawa::sem::add(), addr_filters, otawa::ProgItem::address(), otawa::clp::Value::all, otawa::sem::ANY_COND, otawa::se::SECmp::asString(), otawa::sem::inst::b, otawa::se::SymbExpr::b(), otawa::se::SECmp::canonize(), cerr, otawa::sem::CMP, otawa::se::CMP, otawa::sem::cmp(), otawa::sem::CMPU, otawa::se::CMPU, otawa::sem::inst::cond(), otawa::se::SECmp::copy(), otawa::sem::inst::d(), elm::io::endl, otawa::se::EQ, otawa::sem::EQ, otawa::se::GE, otawa::sem::GE, otawa::se::getFilterForAddr(), otawa::se::getFilterForReg(), otawa::se::GT, otawa::sem::GT, otawa::sem::IF, otawa::clp::Value::isConst(), known_addr, known_reg, otawa::se::LE, otawa::sem::LE, elm::genstruct::Vector< T >::length(), otawa::sem::LOAD, otawa::clp::Value::lower(), otawa::se::LT, otawa::sem::LT, otawa::se::NE, otawa::sem::NE, otawa::se::NONE, otawa::sem::inst::op, otawa::se::SymbExpr::op(), pack, otawa::se::SymbExpr::print(), otawa::clp::REG, reg_filters, otawa::se::SymbExpr::replace(), otawa::sem::SCRATCH, otawa::sem::SET, otawa::sem::SETI, otawa::clp::ClpStatePack::state_after(), otawa::sem::SUB, otawa::sem::sub(), TRACEGF, otawa::se::UGE, otawa::sem::UGE, otawa::se::UGT, otawa::sem::UGT, otawa::se::ULE, otawa::sem::ULE, otawa::se::ULT, otawa::sem::ULT, otawa::se::SymbExpr::used_addr(), otawa::se::SymbExpr::used_reg(), and otawa::se::SymbExpr::val().
Referenced by addFilters(), and iterateBranchPaths().
|
private |
Build the reverse of a condition.
cond | Condition to reverse. |
References otawa::sem::ANY_COND, otawa::sem::EQ, otawa::sem::GE, otawa::sem::GT, otawa::sem::LE, otawa::sem::LT, otawa::sem::NE, otawa::sem::NO_COND, otawa::sem::UGE, otawa::sem::UGT, otawa::sem::ULE, and otawa::sem::ULT.
Referenced by iterateBranchPaths().
Referenced by getFilters(), iterateBranchPaths(), and makeFilters().
|
private |
Referenced by getFilters().
Referenced by makeFilters().
Referenced by makeFilters().
|
private |
Referenced by makeFilters().
Referenced by getFilters(), iterateBranchPaths(), and makeFilters().