#include <include/exp.h>
Inheritance diagram for Exp:
Definition at line 76 of file exp.h.
Public Member Functions | |
virtual Exp * | accept (ExpModifier *v)=0 |
virtual bool | accept (ExpVisitor *v)=0 |
void | addUsedLocs (LocationSet &used, bool memOnly=false) |
virtual void | appendDotFile (std::ofstream &os)=0 |
virtual Type * | ascendType () |
Exp * | bypass () |
void | bypassComp () |
virtual Exp * | clone ()=0 |
bool | containsBadMemof (UserProc *p) |
bool | containsFlags () |
bool | containsMemof (UserProc *proc) |
void | createDotFile (char *name) |
virtual void | descendType (Type *parentType, bool &ch, Statement *s) |
virtual void | doSearchChildren (Exp *search, std::list< Exp ** > &li, bool once) |
void | dump () |
Exp * | expSubscriptAllNull () |
Exp * | expSubscriptValNull (Exp *e) |
Exp * | expSubscriptVar (Exp *e, Statement *def) |
UserProc * | findProc () |
void | fixLocationProc (UserProc *p) |
Exp * | fixSuccessor () |
Exp * | fromSSAleft (UserProc *proc, Statement *d) |
virtual Exp * | genConstraints (Exp *result) |
char * | getAnyStrConst () |
virtual int | getArity () |
int | getComplexityDepth (UserProc *proc) |
Exp * | getGuard () |
unsigned | getLexBegin () |
unsigned | getLexEnd () |
int | getMemDepth () |
virtual int | getNumRefs () |
OPER | getOper () const |
virtual Exp * | getSubExp1 () |
virtual Exp * | getSubExp2 () |
virtual Exp * | getSubExp3 () |
int | getVarIndex () |
bool | isAddrOf () |
bool | isAfpTerm () |
bool | isAnull () |
bool | isArrayIndex () |
bool | isBoolConst () |
bool | isComparison () |
bool | isConjunction () |
bool | isConst () |
bool | isDisjunction () |
bool | isEquality () |
bool | isFalse () |
bool | isFlagCall () |
bool | isFlags () |
bool | isFltConst () |
bool | isGlobal () |
bool | isIntConst () |
bool | isLocal () |
bool | isLocation () |
bool | isMachFtr () |
bool | isMainFlag () |
bool | isMemberOf () |
bool | isMemOf () |
bool | isNil () |
bool | isParam () |
bool | isPC () |
bool | isPostVar () |
bool | isRegN (int n) |
bool | isRegOf () |
bool | isRegOfK () |
bool | isSizeCast () |
bool | isStrConst () |
bool | isSubscript () |
bool | isTemp () |
virtual bool | isTerminal () |
bool | isTrue () |
bool | isTypedExp () |
bool | isTypeOf () |
bool | isTypeVal () |
Exp * | killFill () |
virtual bool | match (const char *pattern, std::map< std::string, Exp * > &bindings) |
virtual Exp * | match (Exp *pattern) |
virtual bool | operator *= (Exp &o)=0 |
virtual bool | operator< (const Exp &o) const =0 |
virtual bool | operator<< (const Exp &o) const |
virtual bool | operator== (const Exp &o) const =0 |
void | partitionTerms (std::list< Exp * > &positives, std::list< Exp * > &negatives, std::vector< int > &integers, bool negate) |
virtual Exp * | polySimplify (bool &bMod) |
virtual void | print (std::ostream &os, bool html=false)=0 |
void | printAsHL (std::ostream &os=std::cout) |
virtual void | printr (std::ostream &os, bool html=false) |
char * | prints () |
void | printt (std::ostream &os=std::cout) |
virtual void | printx (int ind)=0 |
Exp * | propagateAll () |
Propagate all possible assignments to components of this expression. | |
Exp * | propagateAllRpt (bool &changed) |
virtual Exp *& | refSubExp1 () |
virtual Exp *& | refSubExp2 () |
virtual Exp *& | refSubExp3 () |
Exp * | removeSubscripts (bool &allZero) |
virtual bool | search (Exp *search, Exp *&result) |
bool | searchAll (Exp *search, std::list< Exp * > &result) |
Exp * | searchReplace (Exp *search, Exp *replace, bool &change) |
Exp * | searchReplaceAll (Exp *search, Exp *replace, bool &change, bool once=false) |
void | setConscripts (int n, bool bClear) |
void | setLexBegin (unsigned int n) |
void | setLexEnd (unsigned int n) |
void | setOper (OPER x) |
virtual void | setSubExp1 (Exp *e) |
virtual void | setSubExp2 (Exp *e) |
virtual void | setSubExp3 (Exp *e) |
Exp * | simplify () |
virtual Exp * | simplifyAddr () |
virtual Exp * | simplifyArith () |
virtual Exp * | simplifyConstraint () |
Exp * | stripSizes () |
virtual | ~Exp () |
Static Public Member Functions | |
static Exp * | Accumulate (std::list< Exp * > exprs) |
static void | doSearch (Exp *search, Exp *&pSrc, std::list< Exp ** > &li, bool once) |
Protected Member Functions | |
Exp (OPER op) | |
Protected Attributes | |
unsigned | lexBegin |
unsigned | lexEnd |
OPER | op |
Friends | |
class | XMLProgParser |
|
|
|
|
|
Implemented in Const, Terminal, Unary, Binary, Ternary, TypedExp, FlagDef, RefExp, TypeVal, and Location. |
|
|
Definition at line 1855 of file exp.cpp. References opPlus. Referenced by ExpTest::testAccumulate(), and ExpTest::testPartitionTerms(). |
|
Definition at line 3846 of file exp.cpp. References accept(). Referenced by UserProc::checkForGainfulUse(), PentiumFrontEnd::processOverlapped(), Statement::propagateTo(), removeSubscripts(), DataFlow::renameBlockVars(), and ExpTest::testAddUsedLocs(). |
|
Implemented in Const, Terminal, Unary, Binary, Ternary, TypedExp, and FlagDef. Referenced by FlagDef::appendDotFile(), TypedExp::appendDotFile(), Ternary::appendDotFile(), Binary::appendDotFile(), Unary::appendDotFile(), and createDotFile(). |
|
Reimplemented in Const, Terminal, Unary, Binary, Ternary, TypedExp, and RefExp. Definition at line 360 of file exp.h. Referenced by Unary::ascendType(), Binary::ascendType(), checkSignedness(), Binary::descendType(), and Assign::dfaTypeAnalysis(). |
|
Definition at line 3877 of file exp.cpp. References accept(), and NULL. Referenced by bypassComp(), and Localiser::postVisit(). |
|
Definition at line 3882 of file exp.cpp. References bypass(), getSubExp1(), and opMemOf. |
|
|
Definition at line 3929 of file exp.cpp. References accept(), and BadMemofFinder::isFound(). Referenced by Statement::propagateTo(). |
|
Definition at line 3921 of file exp.cpp. References accept(), and FlagsFinder::isFound(). Referenced by ExpTest::testVisitors(). |
|
Definition at line 3936 of file exp.cpp. References accept(), and ExpHasMemofTester::getResult(). |
|
Definition at line 1063 of file exp.cpp. References appendDotFile(), and LOG. |
|
Reimplemented in Const, Terminal, Unary, Binary, Ternary, TypedExp, and RefExp. Definition at line 362 of file exp.h. Referenced by Ternary::descendType(), Unary::descendType(), RefExp::descendType(), BranchStatement::dfaTypeAnalysis(), and Assign::dfaTypeAnalysis(). |
|
Definition at line 1542 of file exp.cpp. References doSearchChildren(), op, opSubscript, and search(). Referenced by PentiumFrontEnd::bumpRegisterAll(), Ternary::doSearchChildren(), Binary::doSearchChildren(), Unary::doSearchChildren(), killFill(), search(), searchAll(), and searchReplaceAll(). |
|
Reimplemented in Unary, Binary, and Ternary. Definition at line 1566 of file exp.cpp. Referenced by doSearch(). |
|
Definition at line 1051 of file exp.cpp. References print(). |
|
Definition at line 3864 of file exp.cpp. References expSubscriptVar(), and NULL. Referenced by UserProc::removeRedundantParameters(). |
|
Definition at line 3859 of file exp.cpp. References expSubscriptVar(), and NULL. |
|
Definition at line 3852 of file exp.cpp. References accept(). Referenced by expSubscriptAllNull(), expSubscriptValNull(), and ExpTest::testSubscriptVars(). |
|
Definition at line 3668 of file exp.cpp. References accept(), and GetProcVisitor::getProc(). |
|
Definition at line 3657 of file exp.cpp. References accept(), and FixProcVisitor::setProc(). |
|
Definition at line 3068 of file exp.cpp. References clone(), Const::getInt(), getOper(), getSubExp1(), opIntConst, opRegOf, opSuccessor, opWild, Location::regOf(), result, search(), searchReplace(), and Const::setInt(). Referenced by Assign::fixSuccessor(), and ExpTest::testFixSuccessor(). |
|
Definition at line 3150 of file exp.cpp. References RefExp::accept(). |
|
Reimplemented in Const, Unary, Binary, Ternary, RefExp, and TypeVal. Definition at line 3168 of file exp.cpp. References opTrue. Referenced by Binary::constrainSub(), and Assign::genConstraints(). |
|
Definition at line 3831 of file exp.cpp. References getSubExp1(), NULL, op, opMemOf, opStrConst, and opSubscript. |
|
Reimplemented in Unary, Binary, and Ternary. Definition at line 131 of file exp.h. Referenced by BasicBlock::findNumCases(), and BranchStatement::genConstraints(). |
|
Definition at line 3887 of file exp.cpp. References accept(), and ComplexityFinder::getDepth(). |
|
Definition at line 1255 of file exp.cpp. References getSubExp1(), NULL, op, and opGuard. |
|
Definition at line 96 of file exp.h. References lexBegin. |
|
Definition at line 97 of file exp.h. References lexEnd. |
|
Definition at line 3893 of file exp.cpp. References accept(), and MemDepthFinder::getDepth(). Referenced by Assign::getMemDepth(). |
|
|
|
|
|
|
Reimplemented in Ternary. Definition at line 274 of file exp.h. Referenced by PentiumFrontEnd::isSetX(), Ternary::operator *=(), Ternary::operator<(), and Ternary::operator==(). |
|
|
|
Definition at line 152 of file exp.h. Referenced by CallStatement::ellipsisProcessing(), UserProc::mapExpressionsToLocals(), Binary::polySimplify(), CallBypasser::postVisit(), Unary::simplifyAddr(), and Constraints::solve(). |
|
Definition at line 1218 of file exp.cpp. References getOper(), Unary::getSubExp1(), getSubExp1(), op, opAddrOf, opAFP, opIntConst, opMemOf, opMinus, opPlus, and opTypedExp. Referenced by ExpTest::testIsAfpTerm(). |
|
|
|
Definition at line 154 of file exp.h. References op, and opArrayIndex. Referenced by ExpSubscripter::preVisit(). |
|
Definition at line 204 of file exp.h. References op, opFalse, and opTrue. Referenced by Binary::polySimplify(). |
|
Definition at line 208 of file exp.h. References op, opEquals, opGtr, opGtrEq, opGtrEqUns, opGtrUns, opLess, opLessEq, opLessEqUns, opLessUns, and opNotEqual. |
|
Definition at line 202 of file exp.h. Referenced by nextConjunct(). |
|
Definition at line 176 of file exp.h. References op, opIntConst, and opStrConst. Referenced by Prog::addReloc(). |
|
Definition at line 200 of file exp.h. Referenced by nextDisjunct(). |
|
Definition at line 206 of file exp.h. Referenced by Constraints::alphaSubst(), ConstraintMap::insert(), UserProc::prove(), and Proc::setProvenTrue(). |
|
|
|
Definition at line 138 of file exp.h. References op, and opFlagCall. Referenced by hasSetFlags(), BranchStatement::rangeAnalysis(), Assign::rangeAnalysis(), Statement::replaceRef(), and FlagsFinder::visit(). |
|
Definition at line 140 of file exp.h. References op, opFflags, and opFlags. Referenced by DataFlow::canRename(), Statement::propagateFlagsTo(), BranchStatement::rangeAnalysis(), Assign::rangeAnalysis(), and Statement::replaceRef(). |
|
Definition at line 174 of file exp.h. References op, and opFltConst. |
|
Definition at line 188 of file exp.h. Referenced by Binary::polySimplify(), and ConstGlobalConverter::preVisit(). |
|
|
Definition at line 186 of file exp.h. Referenced by DataFlow::canRename(), UserProc::findLocal(), UserProc::getSymbolName(), UserProc::getTypeForLocation(), UserProc::isLocal(), StmtSsaXformer::visit(), and UsedLocalFinder::visit(). |
|
Definition at line 221 of file exp.h. References op, opGlobal, opLocal, opMemOf, opParam, and opRegOf. Referenced by Unary::descendType(). |
|
Definition at line 216 of file exp.h. Referenced by PentiumFrontEnd::processStringInst(). |
|
Definition at line 142 of file exp.h. References op, opOF, and opZF. Referenced by DataFlow::canRename(), and Statement::propagateFlagsTo(). |
|
Definition at line 156 of file exp.h. References op, and opMemberAccess. |
|
|
|
|
Definition at line 218 of file exp.h. Referenced by UserProc::getSymbolName(). |
|
Definition at line 164 of file exp.h. Referenced by CallStatement::getTypeFor(). |
|
|
|
Definition at line 1206 of file exp.cpp. References getOper(), op, opIntConst, and opRegOf. Referenced by CHLLCode::AddProcDec(), UserProc::fixCallAndPhiRefs(), UserProc::getSymbolExp(), CallingConvention::StdC::SparcSignature::returnCompare(), CallingConvention::StdC::PentiumSignature::returnCompare(), stackOffset(), and ReturnStatement::updateReturns(). |
|
|
|
Definition at line 180 of file exp.h. Referenced by RTLInstDict::partialType(), and SizeStripper::preVisit(). |
|
Definition at line 170 of file exp.h. References op, and opStrConst. Referenced by Binary::match(), and CallStatement::rangeAnalysis(). |
|
|
Definition at line 3117 of file exp.cpp. References op, opRegOf, and opTemp. Referenced by DataFlow::canRename(), condToRelational(), RTL::insertAfterTemps(), Unary::print(), and TempToLocalMapper::visit(). |
|
Reimplemented in Terminal. Definition at line 194 of file exp.h. Referenced by Assign::rangeAnalysis(), and LocationSet::substitute(). |
|
Definition at line 196 of file exp.h. Referenced by Assign::simplify(). |
|
Definition at line 226 of file exp.h. References op, and opTypedExp. Referenced by CHLLCode::appendExp(), and UserProc::lookupSym(). |
|
Definition at line 190 of file exp.h. Referenced by Constraints::solve(). |
|
Definition at line 214 of file exp.h. Referenced by Constraints::alphaSubst(), Binary::simplifyConstraint(), Constraints::solve(), and Constraints::unify(). |
|
Definition at line 3104 of file exp.cpp. References doSearch(), result, srch1(), and srch2(). Referenced by ExpTest::testKillFill(). |
|
Reimplemented in Const, Terminal, Unary, Binary, Ternary, RefExp, and Location. Definition at line 1367 of file exp.cpp. References ISVARIABLE, and print(). |
|
Reimplemented in Unary, Binary, and RefExp. Definition at line 1266 of file exp.cpp. References clone(), getOper(), opEquals, opList, opNil, and opVar. Referenced by Location::match(), Terminal::match(), Const::match(), RefExp::match(), Ternary::match(), Binary::match(), and Unary::match(). |
|
Implemented in Const, Terminal, Unary, Binary, Ternary, TypedExp, RefExp, and TypeVal. |
|
Implemented in Const, Terminal, Unary, Binary, Ternary, TypedExp, RefExp, and TypeVal. |
|
Reimplemented in TypedExp. |
|
Implemented in Const, Terminal, Unary, Binary, Ternary, TypedExp, RefExp, and TypeVal. |
|
Definition at line 1702 of file exp.cpp. References getSubExp1(), getSubExp2(), op, opIntConst, opMinus, opPlus, opTypedExp, and partitionTerms(). Referenced by partitionTerms(), Binary::simplifyArith(), and ExpTest::testPartitionTerms(). |
|
Reimplemented in Unary, Binary, Ternary, TypedExp, RefExp, and Location. Definition at line 302 of file exp.h. Referenced by RefExp::polySimplify(), Ternary::polySimplify(), Binary::polySimplify(), Unary::polySimplify(), and simplify(). |
|
|
|
|
Reimplemented in Binary, and Ternary. Definition at line 107 of file exp.h. References print(). Referenced by Ternary::print(), and Binary::print(). |
|
Definition at line 1043 of file exp.cpp. References debug_buffer, DEBUG_BUFSIZE, and print(). Referenced by Global::print(). |
|
Definition at line 2998 of file exp.cpp. References Type::getSize(), opTypedExp, and print(). Referenced by operator<<(). |
|
Implemented in Const, Terminal, Unary, Binary, Ternary, TypedExp, RefExp, and TypeVal. Referenced by child(). |
|
Propagate all possible assignments to components of this expression.
Definition at line 3900 of file exp.cpp. References accept(). Referenced by PhiAssign::convertToAssign(). |
|
Definition at line 3906 of file exp.cpp. References accept(), ExpPropagator::clearChanged(), and ExpPropagator::isChanged(). Referenced by Localiser::postVisit(). |
|
Reimplemented in Unary. Definition at line 257 of file exp.cpp. References dummy. |
|
Reimplemented in Binary. Definition at line 258 of file exp.cpp. References dummy. |
|
Reimplemented in Ternary. Definition at line 259 of file exp.cpp. References dummy. |
|
Definition at line 3126 of file exp.cpp. References addUsedLocs(), LocationSet::begin(), LocationSet::end(), Statement::getNumber(), NULL, opSubscript, and searchReplaceAll(). Referenced by ArgSourceProvider::exists(), UserProc::mapParameters(), and ArgSourceProvider::nextArgLoc(). |
|
|
Definition at line 1665 of file exp.cpp. References doSearch(), and search(). Referenced by ImpRefStatement::searchAll(), ImplicitAssign::searchAll(), PhiAssign::searchAll(), Assign::searchAll(), BoolAssign::searchAll(), CaseStatement::searchAll(), BranchStatement::searchAll(), and GotoStatement::searchAll(). |
|
Definition at line 1597 of file exp.cpp. References search(), and searchReplaceAll(). Referenced by fixSuccessor(), ExpTest::testSearchReplace1(), and ExpTest::testSearchReplace2(). |
|
|
Definition at line 3674 of file exp.cpp. References accept(). Referenced by ExpTest::testSetConscripts(). |
|
Definition at line 94 of file exp.h. References lexBegin. Referenced by Const::print(). |
|
Definition at line 95 of file exp.h. References lexEnd. Referenced by Const::print(). |
|
Definition at line 92 of file exp.h. References op. Referenced by Unary::polySimplify(). |
|
Reimplemented in Unary. Definition at line 278 of file exp.h. Referenced by Assign::rangeAnalysis(), Assign::simplify(), and StmtSubscripter::visit(). |
|
Reimplemented in Binary. |
|
Reimplemented in Ternary. |
|
|
Reimplemented in Unary, Binary, and Ternary. Definition at line 304 of file exp.h. Referenced by Assignment::simplifyAddr(), Assign::simplifyAddr(), Ternary::simplifyAddr(), Binary::simplifyAddr(), and ExpTest::testSimplifyAddr(). |
|
Reimplemented in Unary, Binary, and Ternary. Definition at line 298 of file exp.h. Referenced by condToRelational(), Assign::simplify(), GotoStatement::simplify(), Binary::simplifyArith(), Ternary::simplifyArith(), Unary::simplifyArith(), RangeMap::substInto(), ExpTest::testAssociativity(), and ExpTest::testSimplifyArith(). |
|
Reimplemented in Unary, and Binary. Definition at line 305 of file exp.h. Referenced by Binary::simplifyConstraint(), Unary::simplifyConstraint(), and ExpTest::testSimpConstr(). |
|
Definition at line 3681 of file exp.cpp. References accept(). Referenced by SizeStripper::preVisit(). |
|
Reimplemented in Const, Terminal, Unary, Binary, Ternary, TypedExp, FlagDef, RefExp, TypeVal, and Location. |
|
Definition at line 80 of file exp.h. Referenced by getLexBegin(), and setLexBegin(). |
|
Definition at line 80 of file exp.h. Referenced by getLexEnd(), and setLexEnd(). |
|