Otawa
0.10
|
Register. More...
#include <otawa/data/clp/SymbolicExpr.h>
Public Member Functions | |
SEReg (V value, SymbExpr *parent=NULL) | |
Constructors. More... | |
SEReg (const SEReg &expr) | |
Copy constructor. More... | |
virtual SEReg * | copy (void) |
Operators. More... | |
virtual SymbExpr & | operator= (const SEReg &expr) |
Affectation operator. More... | |
virtual bool | operator== (const SymbExpr &expr) const |
Not equal operator. More... | |
virtual String | asString (const hard::Platform *pf=0) |
Operation. More... | |
virtual void | canonize (void) |
Try to recursively transform the expression into it its canonized form. More... | |
virtual Vector< V > | used_reg (void) |
Return the list of registers used (recursively) in this expression. More... | |
bool | operator!= (const SymbExpr &expr) const |
Not equal operator. More... | |
op_t | op (void) const |
Accessors. More... | |
SymbExpr * | a (void) const |
SymbExpr * | b (void) const |
V | val (void) const |
SymbExpr * | parent (void) const |
void | replace (SymbExpr *searched_se, SymbExpr *new_se) |
Operation. More... | |
void | print (io::Output &out, const hard::Platform *pf=0) |
Output a string representation of the expression. More... | |
virtual Vector< V > | used_addr (void) |
Return the list of memory addresses used (recursively) in this expression. More... | |
void | set_a (SymbExpr *a) |
Setters. More... | |
void | set_b (SymbExpr *b) |
Set the second child expression (b) More... | |
void | set_parent (SymbExpr *parent) |
Set the reference to the parent of this. More... | |
Protected Attributes | |
op_t | _op |
Attributes. More... | |
SymbExpr * | _a |
SymbExpr * | _b |
V | _val |
SymbExpr * | _parent |
Register.
Constructors.
Build a new Register Symbolic Expression [R value]
value | the identifier of the register (<0 for temp registers) |
parent | a pointer to the parent |
Referenced by copy().
|
inline |
Copy constructor.
expr | the expression to copy |
|
inlineinherited |
Referenced by otawa::se::SENeg::canonize(), otawa::se::SEAdd::canonize(), otawa::se::getFilterForAddr(), otawa::se::getFilterForReg(), otawa::se::FilterBuilder::makeFilters(), otawa::se::SENeg::operator==(), otawa::se::SEAdd::operator==(), and otawa::se::SECmp::operator==().
|
virtual |
Operation.
Reimplemented from otawa::se::SymbExpr.
References _, otawa::se::SymbExpr::_val, otawa::hard::Platform::findReg(), otawa::clp::Value::isConst(), otawa::clp::Value::lower(), and name.
|
inlineinherited |
Referenced by otawa::se::SENeg::canonize(), otawa::se::SEAdd::canonize(), otawa::se::getFilterForAddr(), otawa::se::getFilterForReg(), otawa::se::FilterBuilder::makeFilters(), otawa::se::SEAdd::operator==(), and otawa::se::SECmp::operator==().
|
virtual |
Try to recursively transform the expression into it its canonized form.
Reimplemented from otawa::se::SymbExpr.
|
virtual |
Operators.
Copy operator
Reimplemented from otawa::se::SymbExpr.
References otawa::se::SymbExpr::_val, and SEReg().
|
inlineinherited |
Accessors.
Referenced by otawa::se::SENeg::canonize(), otawa::se::SEAdd::canonize(), otawa::se::getFilterForAddr(), otawa::se::getFilterForReg(), otawa::se::FilterBuilder::makeFilters(), otawa::se::SEConst::operator==(), otawa::se::SEAddr::operator==(), operator==(), otawa::se::SENeg::operator==(), otawa::se::SEAdd::operator==(), and otawa::se::SECmp::operator==().
|
inherited |
Not equal operator.
expr | the expression to be compared with this |
References otawa::se::SymbExpr::operator==().
Affectation operator.
expr | the expression to be copied in this |
References otawa::se::SymbExpr::_op, and otawa::se::SymbExpr::_val.
|
virtual |
Not equal operator.
expr | the expression to be compared with this |
Reimplemented from otawa::se::SymbExpr.
References otawa::se::SymbExpr::_op, otawa::se::SymbExpr::_val, otawa::se::SymbExpr::op(), and otawa::se::SymbExpr::val().
|
inlineinherited |
|
inherited |
Output a string representation of the expression.
out | the output channel |
pf | current plarform |
References otawa::se::SymbExpr::asString().
Referenced by otawa::se::FilterBuilder::makeFilters(), and operator<<().
Operation.
Recursively replace in this the searched_se expression by new_se
searched_se | the researched expression |
new_se | the expression that will replace searched_se |
new_se will be copied each time it replace a searched_se.
References otawa::se::SymbExpr::_a, otawa::se::SymbExpr::_b, otawa::se::SymbExpr::replace(), otawa::se::SymbExpr::set_a(), and otawa::se::SymbExpr::set_b().
Referenced by otawa::se::getFilterForAddr(), otawa::se::getFilterForReg(), otawa::se::FilterBuilder::makeFilters(), and otawa::se::SymbExpr::replace().
|
inlineinherited |
Setters.
Set the first child expression (a)
a | a pointer to the new first child |
A copy of a will be set as first child. If there was a first child in this expression, it will be delete, but after the copy of a (so it's safe to set_a() a child expression of this->a()).
References otawa::se::SymbExpr::copy(), and otawa::se::SymbExpr::set_parent().
Referenced by otawa::se::SENeg::canonize(), otawa::se::SEAdd::canonize(), otawa::se::SymbExpr::operator=(), otawa::se::SENeg::operator=(), otawa::se::SEAdd::operator=(), otawa::se::SECmp::operator=(), and otawa::se::SymbExpr::replace().
|
inlineinherited |
Set the second child expression (b)
b | a pointer to the new second child |
A copy of b will be set as second child. If there was a second child in this expression, it will be delete, but after the copy of b (so it's safe to set_b() a child expression of this->b()).
References otawa::se::SymbExpr::copy(), and otawa::se::SymbExpr::set_parent().
Referenced by otawa::se::SENeg::canonize(), otawa::se::SEAdd::canonize(), otawa::se::SymbExpr::operator=(), otawa::se::SEAdd::operator=(), otawa::se::SECmp::operator=(), and otawa::se::SymbExpr::replace().
|
inlineinherited |
Set the reference to the parent of this.
parent | a pointer to the new parent. |
Warning: this do not remove the reference to this in the old parent.
Referenced by otawa::se::SymbExpr::set_a(), and otawa::se::SymbExpr::set_b().
Return the list of memory addresses used (recursively) in this expression.
Reimplemented in otawa::se::SEAddr.
References otawa::se::SymbExpr::_a, otawa::se::SymbExpr::_b, elm::genstruct::Vector< T >::add(), elm::genstruct::Vector< T >::contains(), elm::genstruct::Vector< T >::length(), and otawa::se::SymbExpr::used_addr().
Referenced by otawa::se::FilterBuilder::makeFilters(), and otawa::se::SymbExpr::used_addr().
Return the list of registers used (recursively) in this expression.
Reimplemented from otawa::se::SymbExpr.
References otawa::se::SymbExpr::_val, and elm::genstruct::Vector< T >::add().
|
inlineinherited |
Referenced by otawa::se::SENeg::canonize(), otawa::se::SEAdd::canonize(), otawa::se::FilterBuilder::makeFilters(), otawa::se::SEConst::operator==(), otawa::se::SEAddr::operator==(), and operator==().
|
protectedinherited |
Referenced by otawa::se::SENeg::asString(), otawa::se::SEAdd::asString(), otawa::se::SymbExpr::canonize(), otawa::se::SENeg::canonize(), otawa::se::SEAdd::canonize(), otawa::se::SymbExpr::copy(), otawa::se::SENeg::copy(), otawa::se::SEAdd::copy(), otawa::se::SECmp::copy(), otawa::se::SymbExpr::operator=(), otawa::se::SENeg::operator=(), otawa::se::SEAdd::operator=(), otawa::se::SECmp::operator=(), otawa::se::SENeg::operator==(), otawa::se::SEAdd::operator==(), otawa::se::SECmp::operator==(), otawa::se::SymbExpr::replace(), otawa::se::SymbExpr::SymbExpr(), otawa::se::SymbExpr::used_addr(), and otawa::se::SymbExpr::used_reg().
|
protectedinherited |
Referenced by otawa::se::SEAdd::asString(), otawa::se::SymbExpr::canonize(), otawa::se::SEAdd::canonize(), otawa::se::SymbExpr::copy(), otawa::se::SEAdd::copy(), otawa::se::SECmp::copy(), otawa::se::SymbExpr::operator=(), otawa::se::SEAdd::operator=(), otawa::se::SECmp::operator=(), otawa::se::SEAdd::operator==(), otawa::se::SECmp::operator==(), otawa::se::SymbExpr::replace(), otawa::se::SymbExpr::SymbExpr(), otawa::se::SymbExpr::used_addr(), and otawa::se::SymbExpr::used_reg().
|
protectedinherited |
Attributes.
Referenced by otawa::se::SECmp::asString(), otawa::se::SymbExpr::copy(), otawa::se::SECmp::copy(), otawa::se::SymbExpr::operator=(), otawa::se::SEConst::operator=(), otawa::se::SEAddr::operator=(), operator=(), otawa::se::SENeg::operator=(), otawa::se::SEAdd::operator=(), otawa::se::SECmp::operator=(), otawa::se::SymbExpr::operator==(), otawa::se::SEConst::operator==(), otawa::se::SEAddr::operator==(), operator==(), otawa::se::SENeg::operator==(), otawa::se::SEAdd::operator==(), and otawa::se::SECmp::operator==().
|
protectedinherited |
Referenced by otawa::se::SENeg::canonize(), and otawa::se::SEAdd::canonize().
|
protectedinherited |
Referenced by otawa::se::SEConst::asString(), otawa::se::SEAddr::asString(), asString(), otawa::se::SymbExpr::copy(), otawa::se::SEConst::copy(), otawa::se::SEAddr::copy(), copy(), otawa::se::SymbExpr::operator=(), otawa::se::SEConst::operator=(), otawa::se::SEAddr::operator=(), operator=(), otawa::se::SEConst::operator==(), otawa::se::SEAddr::operator==(), operator==(), otawa::se::SEAddr::used_addr(), and used_reg().